Skip to content

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