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

Approval of a PR made by another action #21

Closed
freearhey opened this issue Oct 8, 2019 · 4 comments · Fixed by #186
Closed

Approval of a PR made by another action #21

freearhey opened this issue Oct 8, 2019 · 4 comments · Fixed by #186

Comments

@freearhey
Copy link

Is it possible to run this action right after another action has created a pull request?

Neither push event nor pull_request in my case trigger this action.

At the same time, it’s also not very clear how to correctly filter PR made by an action. Should it be if: github.actor == 'github-action' or if: github.actor == 'github-action[bot]' or something else?

@hmarr
Copy link
Owner

hmarr commented Oct 8, 2019

I don't think that's possible. From https://help.github.com/en/articles/events-that-trigger-workflows#about-workflow-events:

An action in a workflow run can't trigger a new workflow run. For example, if an action pushes code using the repository's GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.

I assume this is to prevent infinite chains of actions being triggered.

@hmarr hmarr closed this as completed Oct 8, 2019
@freearhey
Copy link
Author

Thanks for the answer!

@roryabraham
Copy link
Contributor

Now that Github Actions has the workflow_dispatch event, I think it is possible to trigger one workflow from another. So I would love it if this action took an optional input for the pull request number, because then it can be used from a workflow that executes on the workflow_dispatch event.

@roryabraham
Copy link
Contributor

I know I can't reopen this issue, but I did create a pull request to implement the functionality I want here, if you're interested.

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 a pull request may close this issue.

3 participants