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

Automatically add backport main label for release-pr #2473

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/_release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,24 @@ jobs:
git commit -S --signoff -m ":bookmark: :robot: Release ${RELEASE_TAG}"
git push -u origin ${PREPARE_RELEASE_BRANCH_NAME}

curl --include --verbose --fail \
PR_NUM=$(curl --fail \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-H "Authorization: token ${GITHUB_TOKEN}" \
--request POST \
--data "{\"title\": \":bookmark: :robot: Release ${RELEASE_TAG}\", \"head\": \"${PREPARE_RELEASE_BRANCH_NAME}\", \"base\": \"${RELEASE_BRANCH_NAME}\", \"body\": \"Release PR for ${RELEASE_TAG}.\", \"maintainer_can_modify\": true}" \
$API_URL
${API_BASE_URL}/pulls | jq '.number' )
echo ${PR_NUM}

curl --fail \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-H "Authorization: token ${GITHUB_TOKEN}" \
--request POST \
--data "{\"labels\":[\"${BACKPORT_MAIN_LABEL_NAME}\"]}" \
${API_BASE_URL}/issues/${PR_NUM}/labels
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
API_URL: https://api.github.com/repos/vdaas/vald/pulls
BACKPORT_MAIN_LABEL_NAME: actions/backport/main
API_BASE_URL: https://api.github.com/repos/vdaas/vald
Loading