Open mollyIV opened 4 years ago
Hey @joshdholtz π
Would it be easier if we just rename the secret to GITHUB_TOKEN in our secrets? π€
According to the documentation:
GitHub automatically creates a GITHUB_TOKEN secret to use in your workflow. You can use the GITHUB_TOKEN to authenticate in a workflow run.
Taking that into account, I tried to add GITHUB_TOKEN
to the secrets on my private repo, where the GitHub Actions are enabled:
π£ π₯
If we were able to override GITHUB_TOKEN
via our env variable in secrets, the benefit would be not adding repo-token: ${{ secrets.BOT_GITHUB_TOKEN }}
to the action in a workflow file. However I do not think it bothers us π
Hey @joshdholtz π
Did you get a chance to have a look at these changes? π
Description
The
communicate-on-pull-request-merged
GitHub Action fails in most cases due to:It turns out that when a user opens a pull request on the base project from a fork, no secrets are provided to the workflow. According to the GitHub Actions documentation:
Workaround
As a workaround, to being able to use the secrets in a workflow, we can use a
push
event to trigger the workflow. In the action itself, we can parse the detailed information about the push π‘Testing
A workflow file used for a manual testing:
The bot is set to my private account, that's why you see the comments from the author.
The unit tests have been updated too.
π π