Repository navigation
fix(ci): run architecture check without --report on PR heads that predate it #21349
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
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 |
|---|---|---|
|
|
@@ -61,7 +61,17 @@ jobs: | |
| - name: Verify architecture contracts | ||
| id: architecture | ||
| if: ${{ !cancelled() && steps.setup.outcome == 'success' && hashFiles('tools/architecture/src/cli.ts') != '' }} | ||
| run: pnpm architecture:check --report "$RUNNER_TEMP/architecture-findings.md" | ||
| # PR heads branched before --report existed reject it; drop the fallback once those have rebased. | ||
| run: | | ||
| findings="$RUNNER_TEMP/architecture-findings.md" | ||
| probe=$(GITHUB_ACTIONS= pnpm --silent architecture:check --report= 2>&1 || true) | ||
| if grep -q -- '--report requires a file path' <<< "$probe"; then | ||
| pnpm architecture:check --report "$findings" | ||
|
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. Won't this now run it multiple times?
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. Oh, sneaky =
Member
Author
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. Right: with |
||
| else | ||
| echo "::warning::This PR head's architecture CLI predates --report; rebase onto main to get findings in the PR report." | ||
| echo 'Findings are in the workflow run log and annotations; this PR head predates `--report`.' > "$findings" | ||
| pnpm architecture:check | ||
|
mattmillerai marked this conversation as resolved.
Resolved
|
||
| fi | ||
|
|
||
| - name: Check server facts on changed lines | ||
| env: | ||
|
|
||
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.
So never?
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.
Not never, but you are right that the comment gives no checkable trigger. Here is a concrete one: the fallback can go once no open PR has a merge base older than eb0e38a (#21015, merged 2026-10-19). Right now 142 open PRs were created before that merge. Some have been rebased since; the rest will rebase or go stale. I left the comment wording as it is because a push to this branch would dismiss your approval. If you would like the comment to name that commit, say so and I will push it. Otherwise I can drop the fallback in a small follow-up once that condition holds.