Repository navigation
Address stable release review findings; retire extern-contrib #1055
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
da5b1c7
Address review findings from the 3.9.0 release PR
boomzero ce63eaf
Open release version PRs with the GitHub App token
boomzero f117fe9
Address review on the navbar handler, wording and release workflow
boomzero eab4141
Retire extern-contrib workflows and harden workflows for fork PRs
boomzero 5685b2a
Point external contributors at dev instead of extern-contrib
boomzero 581153a
Bump the version for merged fork PRs from the push to dev
boomzero 84fc889
Document the post-merge version bump for fork PRs
boomzero 461e194
Serialize fork version bumps and only guard stable releases
boomzero 0f68da7
Remove the retired Qodana workflow
boomzero 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
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,54 @@ | ||
| name: UpdateVersionFork | ||
| # fork 的 PR 拿不到 secrets,也不能推送到 fork,所以合并前没法更新版本号。 | ||
| # 维护者合并后会推送到 dev:在这次(可信的)推送上找出所有已合并、但 Update.json 里还没有记录的 fork PR, | ||
| # 逐个基于最新的 dev 更新版本号,并以 GitHub App 身份开自动合并的 PR,等它合并后再处理下一个。 | ||
| # 并发组最多保留一个排队的运行,被替换掉的运行要处理的 PR 也会被后面的运行补上。 | ||
| on: | ||
| push: | ||
| branches: | ||
| - dev | ||
| paths: | ||
| - XMOJ.user.js | ||
| workflow_dispatch: | ||
| concurrency: | ||
| group: update-version-fork | ||
|
boomzero marked this conversation as resolved.
|
||
| cancel-in-progress: false | ||
| jobs: | ||
| UpdateVersionFork: | ||
| runs-on: ubuntu-latest | ||
| if: ${{ !endsWith(github.actor, '[bot]') }} | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Generate a token | ||
| id: generate_token | ||
| uses: actions/create-github-app-token@v3 | ||
| with: | ||
| app-id: ${{ secrets.APP_ID }} | ||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
| permission-contents: write | ||
| permission-pull-requests: write | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| ref: dev | ||
| token: ${{ steps.generate_token.outputs.token }} | ||
| - name: Update versions of merged fork PRs | ||
| env: | ||
| GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | ||
| REPOSITORY: ${{ github.repository }} | ||
| # 在此之前合并的 fork PR 不再补记版本号 | ||
| SINCE: "2026-10-06T00:00:00Z" | ||
| run: | | ||
| PRS=$(gh pr list --repo "$REPOSITORY" --base dev --state merged --limit 50 --json number,isCrossRepository,mergedAt \ | ||
| --jq "map(select(.isCrossRepository and .mergedAt >= \"$SINCE\")) | sort_by(.mergedAt) | .[].number") | ||
| for PR_NUMBER in $PRS; do | ||
| git fetch -q origin dev | ||
| git checkout -q -B dev origin/dev | ||
| if jq -e --argjson pr "$PR_NUMBER" '[.UpdateHistory[].UpdateContents[].PR] | index($pr)' Update.json > /dev/null; then | ||
| echo "#$PR_NUMBER already has a version." | ||
| continue | ||
| fi | ||
| PR_TITLE=$(gh api "repos/$REPOSITORY/pulls/$PR_NUMBER" --jq .title) | ||
| PR_BODY=$(gh api "repos/$REPOSITORY/pulls/$PR_NUMBER" --jq '.body // ""') | ||
| node ./Update/UpdateVersion.js "$GITHUB_TOKEN" "$PR_NUMBER" "$PR_TITLE" "$PR_BODY" fork-merged | ||
| done | ||
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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.
Uh oh!
There was an error while loading. Please reload this page.