Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1c3b8c8
Update default bundle to codeql-bundle-v2.15.4
github-actions[bot] Dec 5, 2023
b6dc4ba
Add changelog note
github-actions[bot] Dec 5, 2023
8ceab9d
update release process
nickfyson Dec 6, 2023
393c767
Update changelog for v2.22.9
github-actions[bot] Dec 6, 2023
1eadb27
Merge pull request #114 from nickfyson-org/update-v2.22.9-8ceab9d12
nickfyson Dec 6, 2023
5e0f9db
Update changelog and version after v2.22.9
github-actions[bot] Dec 7, 2023
458b422
Update checked-in dependencies
github-actions[bot] Dec 7, 2023
382a50a
Merge pull request #2021 from github/mergeback/v2.22.9-to-main-c0d1daa7
nickfyson Dec 7, 2023
d651fbc
change to node20 for all actions
nickfyson Nov 22, 2023
f2d0c2e
upgrade node type definitions
nickfyson Dec 7, 2023
5b19bef
change to node20 for all actions
nickfyson Dec 7, 2023
5b52b36
reintroduce PR check that confirm action can be still be compiled on …
nickfyson Dec 7, 2023
183559c
Merge branch 'main' into update-bundle/codeql-bundle-v2.15.4
cklin Dec 7, 2023
cc4fead
update version in various hardcoded locations
nickfyson Dec 7, 2023
3a9f6a8
update javascript files
nickfyson Dec 7, 2023
303dec0
fix choice of older node version to test
nickfyson Dec 7, 2023
bf51594
Update checked-in dependencies
github-actions[bot] Dec 7, 2023
95be4b2
add not about continuing testing on node 16
nickfyson Dec 7, 2023
0bc194e
switch check sarif action to node20
nickfyson Dec 11, 2023
fe23b5a
Merge pull request #2016 from github/update-bundle/codeql-bundle-v2.15.4
cklin Dec 11, 2023
1de8705
Merge branch 'main' into nickfyson/node-20
nickfyson Dec 12, 2023
370e055
commit changes from upstream testing
nickfyson Dec 12, 2023
646520a
add pr check for node version
nickfyson Dec 12, 2023
ee3debc
add pr check for node version
nickfyson Dec 13, 2023
d508ea3
Merge branch 'main' into nickfyson-patch-1
nickfyson Dec 13, 2023
07459e7
Merge pull request #122 from nickfyson-org/nickfyson-patch-1
nickfyson Dec 13, 2023
fdb1959
Update changelog for v3.22.10
github-actions[bot] Dec 13, 2023
1405fcb
Merge branch 'releases/v3' into update-v3.22.10-07459e710
nickfyson Dec 13, 2023
3b10e61
Merge pull request #124 from nickfyson-org/update-v3.22.10-07459e710
nickfyson Dec 13, 2023
301b5ce
Update version and changelog for v2.22.10
github-actions[bot] Dec 13, 2023
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
add pr check for node version
  • Loading branch information
nickfyson committed Dec 12, 2023
commit 646520a2ed2af16d33524193637252e35d9807e3
5 changes: 4 additions & 1 deletion .github/update-release-branch.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,13 @@ def main():
print(f'No commits to merge from {source_branch} to {target_branch}.')
return

# define distinct prefix in order to support specific pr checks on backports
branch_prefix = 'update' if is_primary_release else 'backport'

# The branch name is based off of the name of branch being merged into
# and the SHA of the branch being merged from. Thus if the branch already
# exists we can assume we don't need to recreate it.
new_branch_name = f'update-v{version}-{source_branch_short_sha}'
new_branch_name = f'{branch_prefix}-v{version}-{source_branch_short_sha}'
print(f'Branch name is {new_branch_name}.')

# Check if the branch already exists. If so we can abort as this script
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,45 @@ jobs:
# we won't be able to find them on Windows.
npm config set script-shell bash
npm test

check-backport-node-versions:
if: ${{ github.event.pull_request }}
name: Check node version for backports
runs-on: ubuntu-latest
timeout-minutes: 45
env:
BASE_REF: ${{ github.event.pull_request.base }}

steps:
- uses: actions/checkout@v4
- id: head-version
name: check HEAD node version
run: |
# NB we are matching the node version string both with and without single quotes
NODE_VERSION=$(find . -name "*.yml" -exec grep -oh "using: 'node[0-9][0-9]\|using: node[0-9][0-9]" {} \; | sed -e "s/using: '//g" -e "s/using: //g" | sort | uniq)
echo "NODE_VERSION: ${NODE_VERSION}"
if [[ $(echo "$NODE_VERSION" | wc -l) -gt 1 ]]; then
echo "Error: More than one node version used in actions."
exit 1
fi
echo "node_version=${NODE_VERSION}" >> $GITHUB_OUTPUT

- id: checkout-base
name: check out base ref for backport check
if: ${{ startsWith(github.ref_name, 'backport-v') }}
uses: actions/checkout@v4
with:
ref: ${{ env.BASE_REF }}

- name: compare with node version on base ref for backport check
if: steps.checkout-base.outcome == 'success'
env:
HEAD_VERSION: ${{ steps.head-version.outputs.node_version }}
run: |
BASE_VERSION=$(find . -name "*.yml" -exec grep -oh "using: 'node[0-9][0-9]\|using: node[0-9][0-9]" {} \; | sed -e "s/using: '//g" -e "s/using: //g" | sort | uniq)
echo "HEAD_VERSION: ${HEAD_VERSION}"
echo "BASE_VERSION: ${BASE_VERSION}"
if [[ "$BASE_VERSION" != "$HEAD_VERSION" ]]; then
echo "Error: Cannot change node version in a backport PR."
exit 1
fi