Repository navigation
Stable release 4.0.0: merge dev into master #1056
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
Changes from all commits
c1b6d4b
d175414
0e3cbb5
519b281
965f08a
51dc11e
56c4989
f21d58c
ac477fe
4654237
3fcc576
a64b24a
8381325
8758133
b46e5c2
1aeb907
66d0fbb
ac3405d
67dccb0
c9399b8
8a8a511
bc914f4
1a9c480
7350dfa
a7efe58
c730563
11dd0db
977942a
4da8acd
cc8aa97
149a6e6
4b4e262
f93813f
b88db84
719ed4b
7b2f167
c5b593d
7796bdc
993220e
862b7f4
65e57e6
7301f4f
8bf7af7
bfc261a
cf481aa
fb35aaf
616eb6b
076f82a
6737a97
a49a942
f5eaedb
d1b7047
3544492
9f9c568
4593892
e816557
40babdc
96c57e1
f3e1746
cf40601
6b301f1
2e6a36f
1dd25d3
7fca414
527e284
9fca6a0
3c116a0
55d3433
d08da3b
5ff72cf
9a44614
b12fa82
98f6ac7
920b15f
510a635
128bc29
cb60e7e
765d222
6ec1bd5
b4ef6b3
865725d
8ca86c2
c7549b0
0b517f9
afea98e
ad2cc20
6f1453a
f3e93bf
225d5ab
26b29a5
3c7ceba
d6c5756
d69a4f2
00e839b
db57c1d
1d2e4a5
6a0f4b1
958e1fb
a6231fd
b10f64d
4c7b614
3da222b
e2de9fe
60b84a3
e5bdbb5
0a5778e
038d6b0
7757836
1bbf8e1
ffd6b47
a42778b
503012b
15c3902
672d408
6d9fd90
23c9c02
63b7518
0111cc1
c4cb359
91128f6
98ac80c
035839d
63ebf7c
a884c4b
ae76631
347755e
9b27a51
7bfbf7e
64e6fdf
7b5d298
d2f737f
1bb14a7
1213cac
6c77877
31c27eb
c1d1a2f
4fc6152
da5b1c7
ce63eaf
f117fe9
eab4141
5685b2a
581153a
84fc889
461e194
0f68da7
75dd908
c61b03b
0cf531d
aef1145
e8d840b
1e06997
f974848
136e268
a40fcf0
6b1612c
e486b31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,12 +1,10 @@ | ||||||
| name: Release | ||||||
| on: | ||||||
| workflow_dispatch: | ||||||
| push: | ||||||
| branches: | ||||||
| - master | ||||||
| paths: | ||||||
| - XMOJ.user.js | ||||||
| - .github/workflows/Release.yml | ||||||
| jobs: | ||||||
| Release: | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
@@ -20,7 +18,7 @@ jobs: | |||||
| private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||||||
| - uses: actions/setup-node@v4 | ||||||
| with: | ||||||
| node-version: 22 | ||||||
| node-version: 16 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Downgrading to Node 16 breaks the Prompt for AI agents
Suggested change
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: This PR deletes the Cloudflare Pages and GitHub Pages deploy steps from both Release.yml and Prerelease.yml, and none of the 13 remaining files in Prompt for AI agents |
||||||
| registry-url: https://registry.npmjs.org/ | ||||||
| - uses: actions/checkout@v6 | ||||||
| with: | ||||||
|
|
@@ -38,13 +36,3 @@ jobs: | |||||
| draft: false | ||||||
| prerelease: false | ||||||
| files: XMOJ.user.js | ||||||
| - uses: cloudflare/wrangler-action@v3 | ||||||
| with: | ||||||
| apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||||||
| accountId: 89969bdf9d5ab8202f8ad8b8ae2c40b8 | ||||||
| command: pages deploy . --project-name=xmoj-script --branch=master | ||||||
| - uses: actions/configure-pages@v5 | ||||||
| - uses: actions/upload-pages-artifact@v3 | ||||||
| with: | ||||||
| path: . | ||||||
| - uses: actions/deploy-pages@v4 | ||||||
| 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 | ||
| 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.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| [submodule "backend"] | ||
| path = backend | ||
| url = https://github.com/XMOJ-Script-dev/XMOJ-bbs | ||
| branch = master |
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.
P2: A daily gitsubmodule interval opens a Dependabot PR every time XMOJ-bbs's master advances, and each merged bump rides into the next stable release via the wholesale dev→master merge with no version bump and no test coverage: Test.yml's actions/checkout doesn't fetch submodules, so these updates are never executed by CI and only get whatever verification the release review provides. Align the interval with the release cadence (weekly/monthly), or cap the noise with open-pull-requests-limit, so backend code isn't promoted to dev (and eventually stable) on an automatic daily cadence.
Prompt for AI agents