forked from OffchainLabs/nitro
-
Notifications
You must be signed in to change notification settings - Fork 22
feat: Upgrade to v3.9.9 #1044
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
Draft
varun-doshi
wants to merge
1
commit into
integration-v3.9.9-rc.3
Choose a base branch
from
vd/upgrade-v3.9.9
base: integration-v3.9.9-rc.3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: Upgrade to v3.9.9 #1044
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| use nix | ||
| watch_file flake.nix | ||
| watch_file flake.lock |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # commit-msg hook: Validates that commit messages follow Conventional Commits | ||
| # format required by release-please. | ||
| # | ||
| # Format: <type>[(scope)][!]: <description> | ||
| # | ||
| # Valid types: feat, fix, perf, revert, docs, chore, style, refactor, test, build, ci | ||
| # | ||
| # Examples: | ||
| # feat: add new authentication flow | ||
| # fix(release): correct tag separator | ||
| # feat!: breaking change to API | ||
| # chore(deps): bump dependencies | ||
| # | ||
| # To skip this check (e.g. merge commits), use: | ||
| # git commit --no-verify | ||
|
|
||
| commit_msg_file="$1" | ||
| commit_msg=$(head -1 "$commit_msg_file") | ||
|
|
||
| # Allow merge commits | ||
| if echo "$commit_msg" | grep -qE '^Merge '; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Allow revert commits | ||
| if echo "$commit_msg" | grep -qE '^Revert "'; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Allow release-please commits | ||
| if echo "$commit_msg" | grep -qE '^chore\(release\):'; then | ||
| exit 0 | ||
| fi | ||
|
|
||
| # Conventional Commits pattern: | ||
| # <type>[(scope)][!]: <description> | ||
| pattern='^(feat|fix|perf|revert|docs|chore|style|refactor|test|build|ci)(\([a-zA-Z0-9._-]+\))?(!)?: .+' | ||
|
|
||
| if ! echo "$commit_msg" | grep -qE "$pattern"; then | ||
| echo "" | ||
| echo "ERROR: Commit message does not follow Conventional Commits format." | ||
| echo "" | ||
| echo " Your message: $commit_msg" | ||
| echo "" | ||
| echo " Expected format: <type>[(scope)]: <description>" | ||
| echo "" | ||
| echo " Valid types: feat, fix, perf, revert, docs, chore, style, refactor, test, build, ci" | ||
| echo "" | ||
| echo " Examples:" | ||
| echo " feat: add new authentication flow" | ||
| echo " fix(release): correct tag separator" | ||
| echo " feat!: breaking change to API" | ||
| echo "" | ||
| echo " This is required for release-please to generate changelogs correctly." | ||
| echo " To skip this check: git commit --no-verify" | ||
| echo "" | ||
| exit 1 | ||
| fi | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| name: PR Title Lint | ||
| run-name: Validate PR title (@${{ github.actor }}) | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| pr-title: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Validate PR title | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| TITLE=$(gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json title --jq .title) | ||
| echo "PR title: $TITLE" | ||
|
|
||
| if ! echo "$TITLE" | grep -Eq '^(feat|fix|chore|docs|refactor|test|ci)(\(.+\))?: .+'; then | ||
| echo "❌ PR title must follow Conventional Commits" | ||
| exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Backport merged pull request | ||
| on: | ||
| pull_request_target: | ||
| types: [closed] | ||
| permissions: | ||
| contents: write # so it can comment | ||
| pull-requests: write # so it can create pull requests | ||
| issues: write # so it can create issues | ||
| jobs: | ||
| backport: | ||
| name: Backport pull request | ||
| runs-on: ubuntu-latest | ||
| # Don't run on closed unmerged pull requests | ||
| if: github.event.pull_request.merged | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Create backport pull requests | ||
| id: backport | ||
| uses: korthout/backport-action@v3 | ||
|
|
||
| - name: create issue if backport failed | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const pr = github.event.pull_request; | ||
| const byTarget = '${{ steps.backport.outputs.was_successful_by_target }}' | ||
| .split(' ') | ||
| .map(item => item.split('=')) | ||
| .filter(arr => arr.length === 2); | ||
| const failedTargets = byTarget.filter(([label, ok]) => ok === 'false').map(([label]) => label); | ||
| const successfulTargets = byTarget.filter(([label, ok]) => ok === 'true').map(([label]) => label); | ||
|
|
||
| if (failedTargets.length === 0) { | ||
| // nothing failed — don't create an issue | ||
| return; | ||
| } | ||
|
|
||
| const title = `Backport failed for PR #${pr.number} to: ${failedTargets.join(', ')}`; | ||
| const body = ` | ||
| Backport action failed for PR #${pr.number}. | ||
| - **Original PR:** #${pr.number} (${pr.title}) | ||
| - **Failed targets:** ${failedTargets.length ? failedTargets.map(t => \`\\\`${t}\\\`\`).join(', ') : 'None'} | ||
| - **Successful targets:** ${successfulTargets.length ? successfulTargets.map(t => \`\\\`${t}\\\`\`).join(', ') : 'None'} | ||
| `; | ||
|
|
||
| await github.rest.issues.create({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| title, | ||
| body, | ||
| labels: ['backport-failure'], | ||
| assignees: [pr.user.login] | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better performance and readability, consider using Bash's built-in regex matching
[[ ... =~ ... ]]instead of pipingechotogrep. This avoids creating subshells for each check. This applies to allgrepchecks in this script (lines 23, 28, 33, 41).