From 2c499484b7458a7a3d509cb8f2574dc3f78ccc3d Mon Sep 17 00:00:00 2001 From: Garrett Delfosse Date: Thu, 9 Apr 2026 07:44:58 -0400 Subject: [PATCH] ci: attribute cherry-pick/backport PRs to the requesting user (#24195) The cherry-pick and backport workflows create PRs under `github-actions[bot]`. Since GitHub doesn't support creating PRs on behalf of another user, this adds attribution to the user who added the label (`github.event.sender.login`): - **Assignee**: the labeler is assigned to the backport PR - **Reviewer**: the labeler is added as a reviewer - **PR body**: includes "Requested by: @user" Applied to both `cherry-pick.yaml` and `backport.yaml`. --- > Generated by Coder Agents --- .github/workflows/backport.yaml | 6 +++++- .github/workflows/cherry-pick.yaml | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml index 89064d89fb..9d3127c389 100644 --- a/.github/workflows/backport.yaml +++ b/.github/workflows/backport.yaml @@ -84,6 +84,7 @@ jobs: PR_TITLE: ${{ github.event.pull_request.title }} PR_URL: ${{ github.event.pull_request.html_url }} MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }} + SENDER: ${{ github.event.sender.login }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -139,6 +140,7 @@ jobs: Original PR: #${PR_NUMBER} — ${PR_TITLE} Merge commit: ${MERGE_SHA} + Requested by: @${SENDER} EOF ) @@ -171,4 +173,6 @@ jobs: --base "$RELEASE_VERSION" \ --head "$BACKPORT_BRANCH" \ --title "$TITLE" \ - --body "$BODY" + --body "$BODY" \ + --assignee "$SENDER" \ + --reviewer "$SENDER" diff --git a/.github/workflows/cherry-pick.yaml b/.github/workflows/cherry-pick.yaml index 23641177a1..f15683432a 100644 --- a/.github/workflows/cherry-pick.yaml +++ b/.github/workflows/cherry-pick.yaml @@ -42,6 +42,7 @@ jobs: PR_TITLE: ${{ github.event.pull_request.title }} PR_URL: ${{ github.event.pull_request.html_url }} MERGE_SHA: ${{ github.event.pull_request.merge_commit_sha }} + SENDER: ${{ github.event.sender.login }} steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: @@ -116,6 +117,7 @@ jobs: Original PR: #${PR_NUMBER} — ${PR_TITLE} Merge commit: ${MERGE_SHA} + Requested by: @${SENDER} EOF ) @@ -136,4 +138,6 @@ jobs: --base "$RELEASE_BRANCH" \ --head "$BACKPORT_BRANCH" \ --title "$TITLE" \ - --body "$BODY" + --body "$BODY" \ + --assignee "$SENDER" \ + --reviewer "$SENDER"