Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
9885f86
Re-enable waiting for processing by default, using the new API semant…
chrisgavin Mar 30, 2022
792bbfe
Update changelog and version after v2.1.8
invalid-email-address Apr 8, 2022
0c80741
Update checked-in dependencies
invalid-email-address Apr 8, 2022
2d80fe8
Merge pull request #1029 from github/mergeback/v2.1.8-to-main-1ed14374
edoardopirovano Apr 8, 2022
b0c570e
autobuild: add working-directory input
cklin Apr 8, 2022
6f17408
Add autobuild workind-directory test
cklin Apr 8, 2022
baf90d1
Merge pull request #1024 from cklin/autobuild-working-dir
cklin Apr 8, 2022
780f4ee
Add codeql-python as CODEOWNERS
RasmusWL Apr 12, 2022
9f20add
Update CODEOWNERS
RasmusWL Apr 12, 2022
7a12645
Merge pull request #1030 from github/RasmusWL/pyton-setup-codeowners
henrymercer Apr 12, 2022
e7869d5
Merge main into wait-for-processing-2.
chrisgavin Apr 14, 2022
c5c5bda
Merge pull request #1007 from github/wait-for-processing-2
chrisgavin Apr 14, 2022
f6312f1
Commit any conflicts during v1 backport to simplify release process
henrymercer Apr 13, 2022
b3bf557
Merge branch 'main' into henrymercer/handle-merge-conflicts-in-releases
henrymercer Apr 14, 2022
bac9320
Update description of "Tag release and merge back" workflow
henrymercer Apr 12, 2022
fce4a01
Update the major version tag within the release process
henrymercer Apr 12, 2022
bce749b
Improve consistency of variable references in Bash
henrymercer Apr 12, 2022
9daf1de
Update references to release branches
henrymercer Apr 12, 2022
3962f1b
Bump glob from 7.1.7 to 8.0.1
dependabot[bot] Apr 14, 2022
0ba58d8
Update checked-in dependencies
invalid-email-address Apr 14, 2022
8b2f5d7
Merge pull request #1034 from github/dependabot/npm_and_yarn/glob-8.0.1
henrymercer Apr 14, 2022
faf9d4b
Merge branch 'main' into henrymercer/use-tags-for-releases
henrymercer Apr 14, 2022
5b5ed44
Add a PR check to check for conflict markers
henrymercer Apr 14, 2022
808c292
Support Pipfile without Pipfile.lock
kojiromike Apr 8, 2022
b9577df
python-setup: refactor Pipenv without lockfile
RasmusWL Apr 12, 2022
e6e3277
Merge pull request #1026 from kojiromike/patch-1
aeisenberg Apr 18, 2022
23b7196
Bump default CodeQL version to 2.9.0
hmakholm Apr 21, 2022
e87e2d8
Merge branch 'main' into henrymercer/use-tags-for-releases
henrymercer Apr 25, 2022
ce63ab5
Merge pull request #1033 from github/henrymercer/use-tags-for-releases
henrymercer Apr 25, 2022
074853a
Suggest resolving conflicts by adding new commits vs amending the mer…
henrymercer Apr 25, 2022
2b8fdb3
Merge branch 'main' into henrymercer/handle-merge-conflicts-in-releases
henrymercer Apr 25, 2022
80771fd
Merge branch 'main' into hmakholm/pr/2.9.0
hmakholm Apr 26, 2022
95b49c3
Merge pull request #1038 from github/hmakholm/pr/2.9.0
hmakholm Apr 26, 2022
d2d14ad
Merge branch 'main' into henrymercer/handle-merge-conflicts-in-releases
henrymercer Apr 26, 2022
bf4ba69
README: Replace git.io shortlink with full link
adityasharad Apr 26, 2022
c76f0b5
Merge pull request #1032 from github/henrymercer/handle-merge-conflic…
henrymercer Apr 26, 2022
eed184a
Merge branch 'main' into adityasharad/readme/replace-git-io
henrymercer Apr 26, 2022
ff8b365
Merge pull request #1044 from github/adityasharad/readme/replace-git-io
henrymercer Apr 26, 2022
6dd9baf
Fix status reporting error on Windows
cklin Apr 25, 2022
7286114
Merge pull request #1042 from cklin/windows-status-report-error
cklin Apr 26, 2022
cbce00d
Update changelog for v2.1.9
invalid-email-address Apr 27, 2022
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
Prev Previous commit
Next Next commit
Update references to release branches
Prepare for renaming `v1` -> `releases/v1` and `v2` -> `releases/v2`.
  • Loading branch information
henrymercer committed Apr 14, 2022
commit 9daf1de73ca769b18a8abc0ddfdfff845708cb1c
25 changes: 12 additions & 13 deletions .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
# Value of the mode flag for a 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
ORIGIN = 'origin'

Expand Down Expand Up @@ -191,8 +194,10 @@ def main():
type=str,
required=True,
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. " +
f"'{V1_MODE}' uses v2 as the source branch and v1 as the target branch."
help=f"Which release to perform. '{V2_MODE}' uses {SOURCE_BRANCH_FOR_MODE[V2_MODE]} as the source " +
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(
'--conductor',
Expand All @@ -203,14 +208,8 @@ def main():

args = parser.parse_args()

if args.mode == V2_MODE:
source_branch = 'main'
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}'")
source_branch = SOURCE_BRANCH_FOR_MODE[args.mode]
target_branch = TARGET_BRANCH_FOR_MODE[args.mode]

repo = Github(args.github_token).get_repo(args.repository_nwo)
version = get_current_version()
Expand Down Expand Up @@ -247,9 +246,9 @@ def main():
print('Creating branch ' + new_branch_name)

if args.mode == V1_MODE:
# If we're performing a backport, start from the v1 branch
print(f'Creating {new_branch_name} from the {ORIGIN}/v1 branch')
run_git('checkout', '-b', new_branch_name, f'{ORIGIN}/v1')
# If we're performing a backport, start from the target branch
print(f'Creating {new_branch_name} from the {ORIGIN}/{target_branch} branch')
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
# changelog to refer to 1.x.x variants. This avoids merge conflicts in the changelog and
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/__analyze-ref-input.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__debug-artifacts.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__extractor-ram-threads.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__go-custom-queries.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__go-custom-tracing-autobuild.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__go-custom-tracing.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__javascript-source-root.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__ml-powered-queries.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__multi-language-autodetect.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__packaging-config-inputs-js.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__packaging-config-js.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__packaging-inputs-js.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__remote-config.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__rubocop-multi-language.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__split-workflow.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__test-autobuild-working-dir.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__test-local-codeql.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__test-proxy.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__test-ruby.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__unset-environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__upload-ref-sha-input.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/__with-checkout-path.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "CodeQL action"

on:
push:
branches: [main, v1, v2]
branches: [main, releases/v1, releases/v2]
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
# by other workflows.
types: [opened, synchronize, reopened, ready_for_review]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/post-release-mergeback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:

push:
branches:
- v1
- v2
- releases/v1
- releases/v2

jobs:
merge-back:
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
git push origin --atomic --force refs/tags/"${VERSION}" refs/tags/"${major_version_tag}"

- 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:
VERSION: "${{ steps.getVersion.outputs.version }}"
NEW_BRANCH: "${{ steps.getVersion.outputs.newBranch }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PR Checks (Basic Checks and Runner)

on:
push:
branches: [main, v1, v2]
branches: [main, releases/v1, releases/v2]
pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Test Python Package Installation on Linux and Mac

on:
push:
branches: [main, v1, v2]
branches: [main, releases/v1, releases/v2]
pull_request:
# Run checks on reopened draft PRs to support triggering PR checks on draft PRs that were opened
# by other workflows.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
# When the v2 release is complete, this workflow will open a PR to update the v1 release branch.
push:
branches:
- v2
- releases/v2

jobs:
update:
Expand Down
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ Here are a few things you can do that will increase the likelihood of your pull
## Releasing (write access required)

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).
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.
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.
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.
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 releases/v2" pull request, and bumps the patch version of the CodeQL Action.

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.
This ensures we keep both the `v1` and `v2` release branches up to date and fully supported.
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 `releases/v1` and `releases/v2` release branches up to date and fully supported.

Review the checklist items in the pull request description.
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)

Expand All @@ -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)]')"
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/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/v2/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.
Expand Down
Loading