Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add workflow_run:completed webhook, set empty client_payload for workflow_dispatch webhook #139

Merged
merged 3 commits into from
Aug 5, 2020

Conversation

heuels
Copy link
Contributor

@heuels heuels commented Aug 5, 2020

Hi!

Just a minor thing, but it still looks worth fixing while I battle the JSON Schema :)

@heuels heuels changed the title fix: set empty client_payload for workflow_dispatch webhook feat: add workflow_run:completed webhook, set empty client_payload for workflow_dispatch webhook Aug 5, 2020
Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not edit the index.json file because it's generated. Instead add and update the example files and run bin/octokit-webhooks.js update, otherwise all the changes will be reverted within an hour via the update workflow

@@ -20593,16 +20593,13 @@
},
{
"name": "repository_dispatch",
"description": "This event occurs when a GitHub App sends a `POST` request to the \"[Create a repository dispatch event](https://docs.github.com/en/v3/repos/#create-a-repository-dispatch-event)\" endpoint.\n\nGitHub Apps must have the `contents` permission to receive this webhook.",
"description": "This event occurs when a GitHub App sends a `POST` request to the \"[Create a repository dispatch event](https://docs.github.com/en/v3/repos/#create-a-repository-dispatch-event)\" endpoint.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the description is directly parsed from the website, this change will be reverted with next next automated update

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't edited index.json manually – I ran bin/octokit-webhooks.js update and that's what was generated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, they've recently moved this note to a separate section: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#availability-35.

@heuels
Copy link
Contributor Author

heuels commented Aug 5, 2020

@gr2m, the schedule section of the update workflow is currently commented out:

# schedule:
# # https://crontab.guru/every-hour
# - cron: 0 * * * *

@gr2m
Copy link
Contributor

gr2m commented Aug 5, 2020

oopsies, that should have been uncommented as part of #134.

When you ran bin/octokit-webhooks.js update, it should have updated the cache, too. Could you commit that file? And also uncomment the lines in webhooks/.github/workflows/update.yml?

@heuels
Copy link
Contributor Author

heuels commented Aug 5, 2020

Done 🙂

Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@gr2m gr2m added the Type: Feature New feature or request label Aug 5, 2020
@gr2m gr2m merged commit a0f5d25 into octokit:master Aug 5, 2020
@heuels heuels deleted the fix/repository_dispatch_workaround branch August 5, 2020 21:58
@github-actions
Copy link
Contributor

github-actions bot commented Aug 5, 2020

🎉 This PR is included in version 3.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants