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

[ci] Fix workflow permission issue when merging from the fork repo #7417

Merged
merged 1 commit into from
Apr 25, 2021

Conversation

xumia
Copy link
Collaborator

@xumia xumia commented Apr 25, 2021

Why I did it

Fix the labeler workflow permission issue when merging from fork repo.
It impacts the labeler workflow to support auto-merge for package versions upgrade on 202012 branch. The current workaround is to add the label "automerge" on the PR sent by mssonicbld, then the automerge workflow will merge the PR.

How I did it

For adding labels, need to use pull_request_target.
See
https://docs.github.com/en/actions/reference/authentication-in-a-workflow#example-1-passing-the-github_token-as-an-input

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@xumia xumia added the ci label Apr 25, 2021
@xumia xumia requested a review from lguohan as a code owner April 25, 2021 01:10
@xumia xumia requested a review from qiluo-msft April 25, 2021 01:11
@xumia xumia changed the title [ci] Fix workflow permission issue when running in merge branch [ci] Fix workflow permission issue when in fork repo Apr 25, 2021
@xumia xumia changed the title [ci] Fix workflow permission issue when in fork repo [ci] Fix workflow permission issue when merging from the fork repo Apr 25, 2021
@xumia
Copy link
Collaborator Author

xumia commented Apr 25, 2021

Test PR to add the label automerge can be found: xumia/test-workflow#5

"github-actions bot added the automerge label 1 minute ago"

@xumia xumia merged commit 57cc208 into sonic-net:master Apr 25, 2021
@xumia xumia deleted the fix_labeler_workflow branch April 25, 2021 02:02
daall pushed a commit that referenced this pull request Apr 29, 2021
Fix the labeler workflow permission issue when merging from fork repo.
It impacts the labeler workflow to support auto-merge for package versions upgrade on 202012 branch. The current workaround is to add the label "automerge" on the PR sent by mssonicbld, then the automerge workflow will merge the PR.
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
…#7417)

Fix the labeler workflow permission issue when merging from fork repo.
It impacts the labeler workflow to support auto-merge for package versions upgrade on 202012 branch. The current workaround is to add the label "automerge" on the PR sent by mssonicbld, then the automerge workflow will merge the PR.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…#7417)

Fix the labeler workflow permission issue when merging from fork repo.
It impacts the labeler workflow to support auto-merge for package versions upgrade on 202012 branch. The current workaround is to add the label "automerge" on the PR sent by mssonicbld, then the automerge workflow will merge the PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants