Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion .github/scripts/bug-server-gray-scope.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ assert.match(source, / build:\n needs: gray-scope\n if: (?:>-\n )?ne
const script = / run: \|\n([\s\S]*)/.exec(gate)[1].replace(/^ /gm, '');
const repository = 'VisActor/VTable';
const original = { EVENT_NAME:'pull_request', HEAD_REF:'fix/normal', HEAD_REPOSITORY:repository, BASE_REPOSITORY:repository,
REPOSITORY:repository, HEAD_REPOSITORY_ID:'123', BASE_REPOSITORY_ID:'123', CREATED_AT:'2026-10-29T08:00:01Z', INTERNAL_SINCE:'' };
BASE_REF:'develop', REPOSITORY:repository, HEAD_REPOSITORY_ID:'123', BASE_REPOSITORY_ID:'123', CREATED_AT:'2026-10-29T08:00:01Z', INTERNAL_SINCE:'' };
const cutoff = String(Date.parse('2026-10-29T08:00:00Z'));

// 直接执行 workflow 的真实 Bash/Python,临时输出在每次调用后回收。
Expand All @@ -29,6 +29,7 @@ function runGate(env) {
test('仅新内部 PR 交接;起点未配置、历史、fork、push 和人工入口保持旧流程', () => {
for (const [env,skip] of [
[{},false], [{INTERNAL_SINCE:cutoff},true],
...['main','dev/test','Develop',''].map(BASE_REF => [{INTERNAL_SINCE:cutoff,BASE_REF},false]),
[{INTERNAL_SINCE:cutoff,CREATED_AT:'2026-10-29T08:00:00Z'},false],
[{INTERNAL_SINCE:cutoff,CREATED_AT:'2026-10-29T07:59:59Z'},false],
[{INTERNAL_SINCE:cutoff,DRAFT:'true'},true],
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/bug-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
HEAD_REF: ${{ github.head_ref }}
HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}
BASE_REPOSITORY: ${{ github.event.pull_request.base.repo.full_name }}
BASE_REF: ${{ github.event.pull_request.base.ref }}
HEAD_REPOSITORY_ID: ${{ github.event.pull_request.head.repo.id }}
BASE_REPOSITORY_ID: ${{ github.event.pull_request.base.repo.id }}
CREATED_AT: ${{ github.event.pull_request.created_at }}
Expand All @@ -32,15 +33,15 @@ jobs:
if [[ "$EVENT_NAME" == 'pull_request' && "$HEAD_REPOSITORY" == "$REPOSITORY" && "$HEAD_REF" == 'codex/workflow-cn-acceptance-20261028' ]]; then
echo 'skip=true' >> "$GITHUB_OUTPUT"
else
# 新内部 Draft 同样暂停旧 Photo,转 ready 后只由新工作流执行一次。
# 仅交接目标 develop;其他分支保留旧 Photo,新 Draft 等待 ready。
skip=$(python3 - <<'PY'
import os, re
from datetime import datetime
e = os.environ
skip = False
if (e['EVENT_NAME'] == 'pull_request' and e['REPOSITORY'] == 'VisActor/VTable'
and e['HEAD_REPOSITORY'] == e['BASE_REPOSITORY'] == e['REPOSITORY']
and e['INTERNAL_SINCE']):
and e['BASE_REF'] == 'develop' and e['INTERNAL_SINCE']):
# 已配置交接却缺失可信元数据时停止旧构建,避免两套 Photo 同时执行。
since = e['INTERNAL_SINCE']
if not re.fullmatch(r'[1-9][0-9]{0,15}', since) or int(since) > 8640000000000000:
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.ja-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ developブランチに送信することを選択します。

### 対象範囲

新しいワークフローの対象は、有効化の初期化完了後に作成され、設定された作成時刻の条件を満たす非 Draft PR です。head と base の両ブランチがこのリポジトリに属している必要があります。「内部 PR」は同一リポジトリ内のブランチ間の PR を指し、作者の雇用関係や組織への所属を条件としません。
新しいワークフローの対象は、有効化の初期化完了後に作成され、設定された作成時刻の条件を満たす非 Draft PR です。head と base の両ブランチがこのリポジトリに属し、base ブランチが `develop` である必要があります。`main`、`dev/*` など他のブランチを対象とする PR は新しいワークフローの対象外で、既存の Photo CI の実行条件を維持します。「内部 PR」は同一リポジトリ内のブランチ間の PR を指し、作者の雇用関係や組織への所属を条件としません。

作成時刻の条件を満たす新しい Draft PR は、Ready for review に変更された時点で対象になります。既存の PR は、コミットの追加、再オープン、Ready への変更によって遡って実行されません。fork PR は現時点ではこのワークフローの対象外です。個別に指定された試験運用 PR は、メンテナーが告知した範囲に従います。

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Automated code review and the PR workflow provide evidence and merge recommendat

### Scope

The new workflow handles non-Draft PRs created after activation initialization and satisfying the configured creation-time cutoff, with both head and base branches in this repository. An internal PR means a PR between branches of the same repository, regardless of the author's employment or organization membership.
The new workflow handles non-Draft PRs created after activation initialization and satisfying the configured creation-time cutoff, with both head and base branches in this repository and `develop` as the base branch. PRs targeting `main`, `dev/*`, or other branches are excluded from this workflow and retain the existing Photo CI trigger rules. An internal PR means a PR between branches of the same repository, regardless of the author's employment or organization membership.

A new Draft PR satisfying the creation-time conditions becomes eligible after it is marked Ready for review. Existing PRs are not backfilled by pushing commits, reopening them, or marking them ready. Fork PRs are not included in this workflow yet. Separately selected gray-validation PRs follow the scope announced by maintainers.

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ git push origin docs/add-funnel-demo

### 适用范围

新工作流接入完成启用初始化后新建、符合接入时间要求,且源分支和目标分支均属于本仓库的非 Draft PR。这里的“内部 PR”指同仓库分支之间的 PR,不以作者是否为公司员工判断。
新工作流接入完成启用初始化后新建、符合接入时间要求,且源分支和目标分支均属于本仓库、目标分支为 `develop` 的非 Draft PR。`main`、`dev/*` 及其他目标分支暂不接入新工作流,继续适用旧 Photo CI 的原有触发规则。这里的“内部 PR”指同仓库分支之间的 PR,不以作者是否为公司员工判断。

符合创建时间条件的新 Draft PR,在转为 Ready for review 后进入流程。启用前已有的 PR 不因推送提交、重新打开或转为 Ready 而自动补跑;fork PR 暂不接入这套工作流。单独指定的灰度 PR 以维护者公布的范围为准。

Expand Down
Loading