Update references to release branches
Prepare for renaming `v1` -> `releases/v1` and `v2` -> `releases/v2`.
This commit is contained in:
parent
bce749b10f
commit
9daf1de73c
30 changed files with 74 additions and 75 deletions
25
.github/update-release-branch.py
vendored
25
.github/update-release-branch.py
vendored
|
|
@ -19,6 +19,9 @@ V1_MODE = 'v1-release'
|
||||||
# Value of the mode flag for a v2 release
|
# Value of the mode flag for a v2 release
|
||||||
V2_MODE = 'v2-release'
|
V2_MODE = 'v2-release'
|
||||||
|
|
||||||
|
SOURCE_BRANCH_FOR_MODE = { V1_MODE: 'releases/v2', V2_MODE: 'main' }
|
||||||
|
TARGET_BRANCH_FOR_MODE = { V1_MODE: 'releases/v1', V2_MODE: 'releases/v2' }
|
||||||
|
|
||||||
# Name of the remote
|
# Name of the remote
|
||||||
ORIGIN = 'origin'
|
ORIGIN = 'origin'
|
||||||
|
|
||||||
|
|
@ -191,8 +194,10 @@ def main():
|
||||||
type=str,
|
type=str,
|
||||||
required=True,
|
required=True,
|
||||||
choices=[V2_MODE, V1_MODE],
|
choices=[V2_MODE, V1_MODE],
|
||||||
help=f"Which release to perform. '{V2_MODE}' uses main as the source branch and v2 as the target branch. " +
|
help=f"Which release to perform. '{V2_MODE}' uses {SOURCE_BRANCH_FOR_MODE[V2_MODE]} as the source " +
|
||||||
f"'{V1_MODE}' uses v2 as the source branch and v1 as the target branch."
|
f"branch and {TARGET_BRANCH_FOR_MODE[V2_MODE]} as the target branch. " +
|
||||||
|
f"'{V1_MODE}' uses {SOURCE_BRANCH_FOR_MODE[V1_MODE]} as the source branch and " +
|
||||||
|
f"{TARGET_BRANCH_FOR_MODE[V1_MODE]} as the target branch."
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--conductor',
|
'--conductor',
|
||||||
|
|
@ -203,14 +208,8 @@ def main():
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
if args.mode == V2_MODE:
|
source_branch = SOURCE_BRANCH_FOR_MODE[args.mode]
|
||||||
source_branch = 'main'
|
target_branch = TARGET_BRANCH_FOR_MODE[args.mode]
|
||||||
target_branch = 'v2'
|
|
||||||
elif args.mode == V1_MODE:
|
|
||||||
source_branch = 'v2'
|
|
||||||
target_branch = 'v1'
|
|
||||||
else:
|
|
||||||
raise ValueError(f"Unexpected value for release mode: '{args.mode}'")
|
|
||||||
|
|
||||||
repo = Github(args.github_token).get_repo(args.repository_nwo)
|
repo = Github(args.github_token).get_repo(args.repository_nwo)
|
||||||
version = get_current_version()
|
version = get_current_version()
|
||||||
|
|
@ -247,9 +246,9 @@ def main():
|
||||||
print('Creating branch ' + new_branch_name)
|
print('Creating branch ' + new_branch_name)
|
||||||
|
|
||||||
if args.mode == V1_MODE:
|
if args.mode == V1_MODE:
|
||||||
# If we're performing a backport, start from the v1 branch
|
# If we're performing a backport, start from the target branch
|
||||||
print(f'Creating {new_branch_name} from the {ORIGIN}/v1 branch')
|
print(f'Creating {new_branch_name} from the {ORIGIN}/{target_branch} branch')
|
||||||
run_git('checkout', '-b', new_branch_name, f'{ORIGIN}/v1')
|
run_git('checkout', '-b', new_branch_name, f'{ORIGIN}/{target_branch}')
|
||||||
|
|
||||||
# Revert the commit that we made as part of the last release that updated the version number and
|
# Revert the commit that we made as part of the last release that updated the version number and
|
||||||
# changelog to refer to 1.x.x variants. This avoids merge conflicts in the changelog and
|
# changelog to refer to 1.x.x variants. This avoids merge conflicts in the changelog and
|
||||||
|
|
|
||||||
4
.github/workflows/__analyze-ref-input.yml
generated
vendored
4
.github/workflows/__analyze-ref-input.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__debug-artifacts.yml
generated
vendored
4
.github/workflows/__debug-artifacts.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__extractor-ram-threads.yml
generated
vendored
4
.github/workflows/__extractor-ram-threads.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__go-custom-queries.yml
generated
vendored
4
.github/workflows/__go-custom-queries.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__go-custom-tracing-autobuild.yml
generated
vendored
4
.github/workflows/__go-custom-tracing-autobuild.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__go-custom-tracing.yml
generated
vendored
4
.github/workflows/__go-custom-tracing.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__javascript-source-root.yml
generated
vendored
4
.github/workflows/__javascript-source-root.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__ml-powered-queries.yml
generated
vendored
4
.github/workflows/__ml-powered-queries.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__multi-language-autodetect.yml
generated
vendored
4
.github/workflows/__multi-language-autodetect.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
4
.github/workflows/__packaging-config-inputs-js.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__packaging-config-js.yml
generated
vendored
4
.github/workflows/__packaging-config-js.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__packaging-inputs-js.yml
generated
vendored
4
.github/workflows/__packaging-inputs-js.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__remote-config.yml
generated
vendored
4
.github/workflows/__remote-config.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__rubocop-multi-language.yml
generated
vendored
4
.github/workflows/__rubocop-multi-language.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__split-workflow.yml
generated
vendored
4
.github/workflows/__split-workflow.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
4
.github/workflows/__test-autobuild-working-dir.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__test-local-codeql.yml
generated
vendored
4
.github/workflows/__test-local-codeql.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__test-proxy.yml
generated
vendored
4
.github/workflows/__test-proxy.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__test-ruby.yml
generated
vendored
4
.github/workflows/__test-ruby.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__unset-environment.yml
generated
vendored
4
.github/workflows/__unset-environment.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
4
.github/workflows/__upload-ref-sha-input.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/__with-checkout-path.yml
generated
vendored
4
.github/workflows/__with-checkout-path.yml
generated
vendored
|
|
@ -11,8 +11,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
|
|
|
||||||
4
.github/workflows/codeql.yml
vendored
4
.github/workflows/codeql.yml
vendored
|
|
@ -2,9 +2,9 @@ name: "CodeQL action"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, v1, v2]
|
branches: [main, releases/v1, releases/v2]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main, v1, v2]
|
branches: [main, releases/v1, releases/v2]
|
||||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||||
# by other workflows.
|
# by other workflows.
|
||||||
types: [opened, synchronize, reopened, ready_for_review]
|
types: [opened, synchronize, reopened, ready_for_review]
|
||||||
|
|
|
||||||
6
.github/workflows/post-release-mergeback.yml
vendored
6
.github/workflows/post-release-mergeback.yml
vendored
|
|
@ -15,8 +15,8 @@ on:
|
||||||
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v1
|
- releases/v1
|
||||||
- v2
|
- releases/v2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
merge-back:
|
merge-back:
|
||||||
|
|
@ -106,7 +106,7 @@ jobs:
|
||||||
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
|
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"
|
||||||
|
|
||||||
- name: Create mergeback branch
|
- name: Create mergeback branch
|
||||||
if: steps.check.outputs.exists != 'true' && contains(github.ref, 'v2')
|
if: steps.check.outputs.exists != 'true' && contains(github.ref, 'releases/v2')
|
||||||
env:
|
env:
|
||||||
VERSION: "${{ steps.getVersion.outputs.version }}"
|
VERSION: "${{ steps.getVersion.outputs.version }}"
|
||||||
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
|
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
|
||||||
|
|
|
||||||
2
.github/workflows/pr-checks.yml
vendored
2
.github/workflows/pr-checks.yml
vendored
|
|
@ -2,7 +2,7 @@ name: PR Checks (Basic Checks and Runner)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, v1, v2]
|
branches: [main, releases/v1, releases/v2]
|
||||||
pull_request:
|
pull_request:
|
||||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||||
# by other workflows.
|
# by other workflows.
|
||||||
|
|
|
||||||
2
.github/workflows/python-deps.yml
vendored
2
.github/workflows/python-deps.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Test Python Package Installation on Linux and Mac
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main, v1, v2]
|
branches: [main, releases/v1, releases/v2]
|
||||||
pull_request:
|
pull_request:
|
||||||
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
|
||||||
# by other workflows.
|
# by other workflows.
|
||||||
|
|
|
||||||
2
.github/workflows/update-release-branch.yml
vendored
2
.github/workflows/update-release-branch.yml
vendored
|
|
@ -7,7 +7,7 @@ on:
|
||||||
# When the v2 release is complete, this workflow will open a PR to update the v1 release branch.
|
# When the v2 release is complete, this workflow will open a PR to update the v1 release branch.
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v2
|
- releases/v2
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update:
|
update:
|
||||||
|
|
|
||||||
|
|
@ -61,22 +61,22 @@ Here are a few things you can do that will increase the likelihood of your pull
|
||||||
## Releasing (write access required)
|
## Releasing (write access required)
|
||||||
|
|
||||||
1. The first step of releasing a new version of the `codeql-action` is running the "Update release branch" workflow.
|
1. The first step of releasing a new version of the `codeql-action` is running the "Update release branch" workflow.
|
||||||
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `v2` release branch.
|
This workflow goes through the pull requests that have been merged to `main` since the last release, creates a changelog, then opens a pull request to merge the changes since the last release into the `releases/v2` release branch.
|
||||||
|
|
||||||
You can start a release by triggering this workflow via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
|
You can start a release by triggering this workflow via [workflow dispatch](https://github.com/github/codeql-action/actions/workflows/update-release-branch.yml).
|
||||||
1. The workflow run will open a pull request titled "Merge main into v2". Mark the pull request as [ready for review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review) to trigger the PR checks.
|
1. The workflow run will open a pull request titled "Merge main into releases/v2". Mark the pull request as [ready for review](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#marking-a-pull-request-as-ready-for-review) to trigger the PR checks.
|
||||||
1. Review the checklist items in the pull request description.
|
1. Review the checklist items in the pull request description.
|
||||||
Once you've checked off all but the last two of these, approve the PR and automerge it.
|
Once you've checked off all but the last two of these, approve the PR and automerge it.
|
||||||
1. When the "Merge main into v2" pull request is merged into the `v2` branch, the "Tag release and merge back" workflow will create a mergeback PR.
|
1. When the "Merge main into releases/v2" pull request is merged into the `releases/v2` branch, the "Tag release and merge back" workflow will create a mergeback PR.
|
||||||
This mergeback incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into v2" pull request, and bumps the patch version of the CodeQL Action.
|
This mergeback incorporates the changelog updates into `main`, tags the release using the merge commit of the "Merge main into releases/v2" pull request, and bumps the patch version of the CodeQL Action.
|
||||||
|
|
||||||
Approve the mergeback PR and automerge it.
|
Approve the mergeback PR and automerge it.
|
||||||
1. When the "Merge main into v2" pull request is merged into the `v2` branch, the "Update release branch" workflow will create a "Merge v2 into v1" pull request to merge the changes since the last release into the `v1` release branch.
|
1. When the "Merge main into releases/v2" pull request is merged into the `releases/v2` branch, the "Update release branch" workflow will create a "Merge releases/v2 into releases/v1" pull request to merge the changes since the last release into the `releases/v1` release branch.
|
||||||
This ensures we keep both the `v1` and `v2` release branches up to date and fully supported.
|
This ensures we keep both the `releases/v1` and `releases/v2` release branches up to date and fully supported.
|
||||||
|
|
||||||
Review the checklist items in the pull request description.
|
Review the checklist items in the pull request description.
|
||||||
Once you've checked off all the items, approve the PR and automerge it.
|
Once you've checked off all the items, approve the PR and automerge it.
|
||||||
1. Once the mergeback has been merged to `main` and the "Merge v2 into v1" PR has been merged to `v1`, the release is complete.
|
1. Once the mergeback has been merged to `main` and the "Merge releases/v2 into releases/v1" PR has been merged to `releases/v1`, the release is complete.
|
||||||
|
|
||||||
## Keeping the PR checks up to date (admin access required)
|
## Keeping the PR checks up to date (admin access required)
|
||||||
|
|
||||||
|
|
@ -91,8 +91,8 @@ To regenerate the PR jobs for the action:
|
||||||
CHECKS="$(gh api repos/github/codeql-action/commits/${SHA}/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "LGTM.com" or . == "Update dependencies" or . == "Update Supported Enterprise Server Versions" | not)]')"
|
CHECKS="$(gh api repos/github/codeql-action/commits/${SHA}/check-runs --paginate | jq --slurp --compact-output --raw-output '[.[].check_runs | .[].name | select(contains("https://") or . == "CodeQL" or . == "LGTM.com" or . == "Update dependencies" or . == "Update Supported Enterprise Server Versions" | not)]')"
|
||||||
echo "{\"contexts\": ${CHECKS}}" > checks.json
|
echo "{\"contexts\": ${CHECKS}}" > checks.json
|
||||||
gh api -X "PATCH" repos/github/codeql-action/branches/main/protection/required_status_checks --input checks.json
|
gh api -X "PATCH" repos/github/codeql-action/branches/main/protection/required_status_checks --input checks.json
|
||||||
gh api -X "PATCH" repos/github/codeql-action/branches/v2/protection/required_status_checks --input checks.json
|
gh api -X "PATCH" repos/github/codeql-action/branches/releases/v2/protection/required_status_checks --input checks.json
|
||||||
gh api -X "PATCH" repos/github/codeql-action/branches/v1/protection/required_status_checks --input checks.json
|
gh api -X "PATCH" repos/github/codeql-action/branches/releases/v1/protection/required_status_checks --input checks.json
|
||||||
````
|
````
|
||||||
|
|
||||||
2. Go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules have been updated.
|
2. Go to the [branch protection rules settings page](https://github.com/github/codeql-action/settings/branches) and validate that the rules have been updated.
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ for file in os.listdir('checks'):
|
||||||
},
|
},
|
||||||
'on': {
|
'on': {
|
||||||
'push': {
|
'push': {
|
||||||
'branches': ['main', 'v1', 'v2']
|
'branches': ['main', 'releases/v1', 'releases/v2']
|
||||||
},
|
},
|
||||||
'pull_request': {
|
'pull_request': {
|
||||||
'types': ["opened", "synchronize", "reopened", "ready_for_review"]
|
'types': ["opened", "synchronize", "reopened", "ready_for_review"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue