parliament 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +22 -0
- data/README.md +69 -0
- data/Rakefile +2 -0
- data/lib/parliament.rb +5 -0
- data/lib/parliament/version.rb +3 -0
- data/parliament.gemspec +23 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3dd3358ce66eea11e192d812708a683043388fb4
|
4
|
+
data.tar.gz: bddfe2beade3736937a534e3fc9382411f5b880d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e5e3a2352ad532a4621c5e06afcc028894c716f10e02e52374598cb81879abd074db7b2fb81dde27bb953399a172438e3902ccc17ee995814e8e6e9d4195a416
|
7
|
+
data.tar.gz: d6e195db5b091a492fa42b439ea8e9a83690c9a8c84bb907d8e179d73360c1e2fe140cbbe297982c6215db626ed6f42d76bea5f4fe408dacf2ad2b4b287edda8
|
data/.gitignore
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
.bundle
|
4
|
+
.config
|
5
|
+
.yardoc
|
6
|
+
Gemfile.lock
|
7
|
+
InstalledFiles
|
8
|
+
_yardoc
|
9
|
+
coverage
|
10
|
+
doc/
|
11
|
+
lib/bundler/man
|
12
|
+
pkg
|
13
|
+
rdoc
|
14
|
+
spec/reports
|
15
|
+
test/tmp
|
16
|
+
test/version_tmp
|
17
|
+
tmp
|
18
|
+
*.bundle
|
19
|
+
*.so
|
20
|
+
*.o
|
21
|
+
*.a
|
22
|
+
mkmf.log
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 RentPath
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Colin Rymer
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
Parliament
|
2
|
+
==========
|
3
|
+
|
4
|
+
A Ruby app that listens to GitHub events and merges pull requests when specified criteria have been met. Inspired by [plus-pull](https://github.com/christofdamian/plus-pull).
|
5
|
+
|
6
|
+
## Usage
|
7
|
+
|
8
|
+
When Pull requests have satisfied the following criteria, they are automatically merged:
|
9
|
+
* The sum of `+1` and `-1` in comments is greater than or equal to the configured sum. *Note: only the first vote in each comment is counted.*
|
10
|
+
* There are no comments containing `/\[(B|b)locker\]/` (`[blocker]` or `[Blocker]`). *Note: striking through the "[blocker]" by surrounding it with `~~`, e.g. "~~[blocker]~~" will cause the comment to be ignored.*
|
11
|
+
* The pull request can be merged.
|
12
|
+
* Optionally (defaults to true), the commit status must be `success`.
|
13
|
+
|
14
|
+
## Installation/Setup
|
15
|
+
|
16
|
+
### Parliament
|
17
|
+
TBD
|
18
|
+
|
19
|
+
### GitHub
|
20
|
+
Setup is easy, just setup the webhook for all events to a repo and it'll start handling merge requests (Parliament handles `+form` and `+json`, so use what you'd prefer).
|
21
|
+
|
22
|
+
## Configuration
|
23
|
+
Parliament can be configured by setting configuration options within the configuration block in `application.rb`, i.e.
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
Parliament.configure do |config|
|
27
|
+
|
28
|
+
config.github_token = <GitHub Oath Token>
|
29
|
+
|
30
|
+
# the sum of +1/-1
|
31
|
+
#
|
32
|
+
# default: 3
|
33
|
+
config.sum = 2
|
34
|
+
|
35
|
+
# current status must be success
|
36
|
+
#
|
37
|
+
# default: true
|
38
|
+
config.status = false
|
39
|
+
|
40
|
+
# an array of required voters' github usernames
|
41
|
+
# also accepts an array returning block that is called on each check.
|
42
|
+
#
|
43
|
+
# default: empty array
|
44
|
+
config.required do
|
45
|
+
[...]
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
```
|
50
|
+
|
51
|
+
## Alternatives
|
52
|
+
* [plus-pull](https://github.com/christofdamian/plus-pull)
|
53
|
+
|
54
|
+
## Contributing
|
55
|
+
|
56
|
+
1. Fork it
|
57
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
58
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
59
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
60
|
+
5. Create new Pull Request
|
61
|
+
|
62
|
+
## Running the Tests
|
63
|
+
|
64
|
+
`bundle exec rake`
|
65
|
+
|
66
|
+
## License
|
67
|
+
|
68
|
+
Parliament is released under the MIT License. See the bundled LICENSE file for
|
69
|
+
details.
|
data/Rakefile
ADDED
data/lib/parliament.rb
ADDED
data/parliament.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'parliament/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "parliament"
|
8
|
+
spec.version = Parliament::VERSION
|
9
|
+
spec.authors = ["Colin Rymer"]
|
10
|
+
spec.email = ["colin.rymer@gmail.com"]
|
11
|
+
spec.summary = %q{A Rack app for automatically merging pull request when conditions are met.}
|
12
|
+
spec.description = spec.summary
|
13
|
+
spec.homepage = "https://github.com/primedia/parliament"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: parliament
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Colin Rymer
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: A Rack app for automatically merging pull request when conditions are
|
42
|
+
met.
|
43
|
+
email:
|
44
|
+
- colin.rymer@gmail.com
|
45
|
+
executables: []
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE
|
52
|
+
- LICENSE.txt
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- lib/parliament.rb
|
56
|
+
- lib/parliament/version.rb
|
57
|
+
- parliament.gemspec
|
58
|
+
homepage: https://github.com/primedia/parliament
|
59
|
+
licenses:
|
60
|
+
- MIT
|
61
|
+
metadata: {}
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
requirements: []
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 2.2.2
|
79
|
+
signing_key:
|
80
|
+
specification_version: 4
|
81
|
+
summary: A Rack app for automatically merging pull request when conditions are met.
|
82
|
+
test_files: []
|