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

PRs created by backport-action should trigger the CI #379

Open
grische opened this issue Aug 19, 2023 · 1 comment
Open

PRs created by backport-action should trigger the CI #379

grische opened this issue Aug 19, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@grische
Copy link

grische commented Aug 19, 2023

Is your feature request related to a problem? Please describe.
PRs created by the backport-action do not trigger the CI for the PR.
Triggering the CI, especially for backports, is important to verify the integrity of the PR.

Describe the solution you'd like
I do not know of a good solution on how to achieve that, but for starters, an entry in the README outlining examples on how to overcome this, would be great.

Describe alternatives you've considered
See https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

@grische grische added the enhancement New feature or request label Aug 19, 2023
@korthout
Copy link
Owner

korthout commented Aug 19, 2023

That's a good point. Thanks for raising this @grische

By default, backport-action uses the GITHUB_TOKEN which does not create new workflow runs for the events it triggers. You can use a Personal Access Token instead of the default GITHUB_TOKEN. I'll consider adding something about this to the README.

For backport-action, there are several events triggered. So, the solution depends on the type of event your workflow runs on. You can use a Personal Access Token and set it in the workflow for the:

  • checkout action using the token input so commits are pushed by the associated user (triggers a push event, example)
  • backport action using the github_token input so the pull request is opened by the associated user (triggers a pull_request event, example) (this token is also used for any other interactions with GitHub by the action, e.g. commenting)

This example workflow uses both and this works well.

@korthout korthout added the documentation Improvements or additions to documentation label Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants