File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 2828 permissions :
2929 contents : write
3030 pull-requests : write
31+ issues : read
3132
3233 steps :
3334 - name : Checkout code
@@ -75,14 +76,23 @@ jobs:
7576
7677 PR_NUMBER=$(gh pr list --head "$BRANCH_NAME" --base "$BASE_BRANCH" --json number,headRepositoryOwner --jq ".[] | select(.headRepositoryOwner.login == \"$FORK_OWNER\") | .number" | head -n 1)
7778
79+ # Search for the release maintenance issue
80+ ISSUE_NUMBER=$(gh issue list --repo "$GH_REPO" --search "\"$VERSION\" \"Rancher Manager Release Maintenance Task Checklist\" in:title is:open" --json number --jq '.[0].number')
81+
82+ PR_BODY="Automated release maintenance updates for version $VERSION."$'\n'"Command executed: \`./release-maintenance.sh -t \"$TAG\" -d \"$DATE\" --prime \"$PRIME\" --community \"$COMMUNITY\"\`"
83+
84+ if [[ -n "$ISSUE_NUMBER" && "$ISSUE_NUMBER" != "null" ]]; then
85+ PR_BODY="$PR_BODY"$'\n\n'"Relates to #$ISSUE_NUMBER"
86+ fi
87+
7888 if [[ -n "$PR_NUMBER" && "$PR_NUMBER" != "null" ]]; then
7989 gh pr edit "$PR_NUMBER" \
8090 --title "$VERSION - Release Maintenance" \
81- --body "Automated release maintenance updates for version $VERSION."$'\n'"Command executed: \`./release-maintenance.sh -t \"$TAG\" -d \"$DATE\" --prime \"$PRIME\" --community \"$COMMUNITY\"\` "
91+ --body "$PR_BODY "
8292 else
8393 PR_URL=$(gh pr create \
8494 --title "$VERSION - Release Maintenance" \
85- --body "Automated release maintenance updates for version $VERSION."$'\n'"Command executed: \`./release-maintenance.sh -t \"$TAG\" -d \"$DATE\" --prime \"$PRIME\" --community \"$COMMUNITY\"\` " \
95+ --body "$PR_BODY " \
8696 --base "$BASE_BRANCH" \
8797 --head "${FORK_OWNER}:${BRANCH_NAME}")
8898 PR_NUMBER=${PR_URL##*/}
You can’t perform that action at this time.
0 commit comments