Skip to content

Commit 01ada7b

Browse files
[infra] Fixes workflow by adding fetch depth to checkout (#233)
1 parent 6d4bc09 commit 01ada7b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/prs_create-cherry-pick-pr.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ jobs:
4848
if: needs.detect_cherry_pick_target.outputs.targetBranch != ''
4949
steps:
5050
- name: Checkout
51-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
51+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
with:
53+
fetch-depth: 0
5254
- name: Cherry pick and create the new PR
5355
env:
5456
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/scripts/prs/detectTargetBranch.js

+8
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ module.exports = async ({ core, context, github }) => {
9494
return;
9595
}
9696

97+
core.info(`>>> Removing the "needs cherry-pick" label from the PR`);
98+
await github.rest.issues.removeLabel({
99+
owner,
100+
repo,
101+
issue_number: pullNumber,
102+
name: 'needs cherry-pick',
103+
});
104+
97105
target = targetLabels[0];
98106
core.info(`>>> Setting found 'TARGET_BRANCH' output.`);
99107
core.setOutput('TARGET_BRANCH', target);

0 commit comments

Comments
 (0)