Skip to content

Commit

Permalink
Update GitHub Webhook event list - Release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ssaunier committed Aug 26, 2021
1 parent 6e9514c commit 1e64e88
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Ruby 2.6
- name: Set up Ruby 2.7
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
ruby-version: 2.7.x
- name: Build and test with Rake
run: |
gem install bundler
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.6
2.7.4
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ to a [GitHub webhook](https://developer.github.com/webhooks/)
Add this line to your application's Gemfile:

```ruby
gem 'github_webhook', '~> 1.1'
gem 'github_webhook', '~> 1.2'
```

And then execute:
Expand Down
21 changes: 16 additions & 5 deletions lib/github_webhook/processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,36 @@ class UnsupportedContentTypeError < StandardError; end

# To fetch list from https://developer.github.com/v3/activity/events/types
# run this little JS code in the console:
# $("h3:contains('Webhook event name')").next('p').each((_, p) => console.log(p.innerText))
# document.querySelectorAll('.list-style-none li.lh-condensed a').forEach(e => console.log(e.text))
GITHUB_EVENTS = %w(
check_run
check_suite
code_scanning_alert
commit_comment
content_reference
create
delete
deploy_key
deployment
deployment_status
download
follow
discussion
discussion_comment
fork
fork_apply
github_app_authorization
gist
gollum
installation
installation_repositories
issue_comment
issues
label
marketplace_purchase
member
membership
meta
milestone
organization
org_block
package
page_build
ping
project_card
Expand All @@ -50,13 +54,20 @@ class UnsupportedContentTypeError < StandardError; end
pull_request_review_comment
push
release
repository_dispatch
repository
repository_import
repository_vulnerability_alert
secret_scanning_alert
security_advisory
sponsorship
star
status
team
team_add
watch
workflow_dispatch
workflow_run
)

def create
Expand Down
2 changes: 1 addition & 1 deletion lib/github_webhook/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module GithubWebhook
VERSION = "1.1.2"
VERSION = "1.2.0"
end

0 comments on commit 1e64e88

Please sign in to comment.