Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

ci: Add pull request write permissions for cherry-pick workflow (#52927)

Finn Evers5a74733aee07
diff --git a/.github/workflows/cherry_pick.yml b/.github/workflows/cherry_pick.yml
index fc91aadee7b..ed0800dc5bb 100644
--- a/.github/workflows/cherry_pick.yml
+++ b/.github/workflows/cherry_pick.yml
@@ -37,6 +37,7 @@ jobs:
private-key: ${{ secrets.ZED_ZIPPY_APP_PRIVATE_KEY }}
permission-contents: write
permission-workflows: write
+ permission-pull-requests: write
- name: cherry_pick::run_cherry_pick::cherry_pick
run: ./script/cherry-pick "$BRANCH" "$COMMIT" "$CHANNEL"
env:
diff --git a/tooling/xtask/src/tasks/workflows/cherry_pick.rs b/tooling/xtask/src/tasks/workflows/cherry_pick.rs
index ad8bc1c2c84..46fb41094eb 100644
--- a/tooling/xtask/src/tasks/workflows/cherry_pick.rs
+++ b/tooling/xtask/src/tasks/workflows/cherry_pick.rs
@@ -49,6 +49,7 @@ fn run_cherry_pick(
.with_permissions([
(TokenPermissions::Contents, Level::Write),
(TokenPermissions::Workflows, Level::Write),
+ (TokenPermissions::PullRequests, Level::Write),
])
.into();