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 labels for release branch #1036

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .ci/scripts/create_release_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ git add docs/versions.txt
bump-my-version bump minor --commit --message $'Bump version to {new_version}' --allow-dirty

git push origin "${NEW_BRANCH}"

if [ "${GITHUB_ENV:-}" ]
then
echo "NEW_BRANCH=${NEW_BRANCH}" >> "${GITHUB_ENV}"
fi
2 changes: 1 addition & 1 deletion .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: true

jobs:
single_commit:
apply_labels:
runs-on: "ubuntu-latest"
name: "Label PR"
permissions:
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/release_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,17 @@ jobs:
body: ""
branch: "bump_version"
delete-branch: true
- name: "Add Backport Label for new Branch"
uses: "actions/github-script@v7"
with:
script: |
const { NEW_BRANCH } = process.env;
const labelName = "backport-" + NEW_BRANCH;

await github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: labelName,
color: "C8780A",
});
...
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,8 @@ git add docs/versions.txt
bump-my-version bump minor --commit --message $'Bump version to {new_version}' --allow-dirty

git push origin "${NEW_BRANCH}"

if [ "${GITHUB_ENV:-}" ]
then
echo "NEW_BRANCH=${NEW_BRANCH}" >> "${GITHUB_ENV}"
fi
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: true

jobs:
single_commit:
apply_labels:
runs-on: "ubuntu-latest"
name: "Label PR"
permissions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,17 @@ jobs:
body: ""
branch: "bump_version"
delete-branch: true
- name: "Add Backport Label for new Branch"
uses: "actions/github-script@v7"
with:
script: |
const { NEW_BRANCH } = process.env;
const labelName = "backport-" + NEW_BRANCH;

await github.rest.issues.createLabel({
owner: context.repo.owner,
repo: context.repo.repo,
name: labelName,
color: "C8780A",
});
...
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Lint requirements
black==24.8.0
flake8==7.1.0
flake8==7.1.1
flake8-pyproject==1.2.3
isort==5.13.2
mypy==1.11.1
Expand Down
Loading