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

Make it possible to run probot-settings as a GitHub Action #409

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elstudio
Copy link
Contributor

@elstudio elstudio commented Feb 18, 2021

This PR makes it possible to run probot-settings as a GitHub Action.

If run from a GitHub action, the commit payload lacks the modified and added properties, see:

https://github.blog/changelog/2019-10-16-changes-in-github-actions-push-event-payload/

This code now explicitly tests for these properties. If we have them (as if we were run as a typical Probot app), the code logic is unchanged.

But if these properties are missing — as in the case if we are run from an action — then act as if settings.yml has changed.

This makes it possible to run probot-settings from an action like this one: elstudio/actions-settings#11.

@nitrocode
Copy link
Contributor

This would be pretty handy to run as a github action instead of as a bot. An action is much easier to get integrated into an org than an app and can be easier to try it out.

@elstudio would you resolve your conflicts? Maybe it's something that can be merged in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants