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

Give write access to backport action explicitly #61626

Merged
merged 1 commit into from
Nov 15, 2021

Conversation

hoyosjs
Copy link
Member

@hoyosjs hoyosjs commented Nov 15, 2021

No description provided.

@hoyosjs hoyosjs requested review from mmitche and a team November 15, 2021 21:31
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@hoyosjs
Copy link
Member Author

hoyosjs commented Nov 15, 2021

cc: @dougbu as this might affect y'all as well.

@hoyosjs hoyosjs merged commit 9fceaa0 into main Nov 15, 2021
@hoyosjs hoyosjs deleted the juhoyosa/explicit-write-backport branch November 15, 2021 21:38
permissions:
contents: write
issues: read
pull-requests: write
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hoyosjs I get pull-requests: write but why is write needed for contents or read for issues

Copy link
Member

@dougbu dougbu Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expected

permissions:
  contents: read
  pull-requests: write

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All comments fall under "issues" in the GitHub API IIRC, even PR comments, so that's why read is required for issues.

write is probably required for contents since this workflow creates a new branch and commits as part of how it functions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pull-requests: write is only for the explicit action to create the pull request from one branch to another.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly those scopes are why I gave it those permissions. @vcsjones do you know if this is correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might need write on issues because the backport bot leaves a comment on PRs (like these) that the back port has been started. @jkoritzinsky is right, PR comments are "issues" (also evidence of this that this backport bot triggers on issue_comment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot about the reply. Much appreciated @vcsjones

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants