Skip to content

ci: validate PR titles without pull_request_target - #365

Merged
ctreatma merged 1 commit into
mainfrom
ci/validate-pr-no-pull-request-target
Nov 9, 2026
Merged

ctreatma merged 1 commit into
mainfrom
ci/validate-pr-no-pull-request-target

Conversation

@ctreatma

@ctreatma ctreatma commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • equinix-validate-pr.yaml now triggers on pull_request with read-only permissions and uploads the result (PR number and any error message) as a short-lived artifact.
  • New equinix-validate-pr-comment.yaml runs on workflow_run, downloads the artifact, and posts or clears the sticky PR comment. It never checks out PR code; the PR number is reduced to digits and the title-derived error text is only used as a comment body.
  • Actions are pinned to commit SHAs.

pull-request.yml (generated by pulumi-labs/ci-mgmt) still uses pull_request_target. ci-mgmt has no option to omit it, so it is left alone here and needs an upstream change.

Test plan

  • After merge, open a PR with a non-conventional title and confirm the check fails and the comment appears
  • Fix the title and confirm the comment is removed
  • Confirm a fork PR behaves the same

🤖 Generated with Claude Code

@ctreatma
ctreatma requested a review from a team November 9, 2026 19:01
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

Maintainer note: consult the runbook for dealing with any breaking changes.

ctreatma added a commit to equinix/terraform-provider-equinix that referenced this pull request Nov 9, 2026
## Summary
- `validate_pr` now triggers on `pull_request` with read-only
permissions and uploads each job's result (PR number and any error
message) as a short-lived artifact.
- The `enforce-packages` check follows the same pattern, with its own
artifact and its own sticky comment.
- New `validate_pr_comment` workflow runs on `workflow_run`, downloads
the artifacts, and posts or clears the sticky PR comments. It never
checks out PR code; the PR number is reduced to digits and the error
text is only used as a comment body.
- Actions are pinned to commit SHAs.

`fabric_acctest.yml` also uses `pull_request_target`, but deliberately
(it needs secrets and environment-gated approval for acceptance tests),
so it is left alone here.

- `.github/CODEOWNERS`: add a final `/.github/` rule assigning
`@equinix/governor-devrel-engineering`. It is last on purpose, since the
last matching pattern wins and earlier globs like `*fabric*` also match
workflow files.

Same change as equinix/pulumi-equinix#365.

## Test plan
- [ ] After merge, open a PR with a non-conventional title and confirm
the check fails and the comment appears
- [ ] Fix the title and confirm the comment is removed
- [ ] Add a new `.go` file under `equinix/` and confirm the packages
comment appears and clears
- [ ] Confirm a fork PR behaves the same

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Run the title check on the unprivileged pull_request trigger and move
commenting into a workflow_run workflow that only consumes a small
artifact (PR number and error text) from the validation run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@ctreatma
ctreatma force-pushed the ci/validate-pr-no-pull-request-target branch from 792ba5a to 183e6c3 Compare November 9, 2026 21:54
@ctreatma
ctreatma merged commit c6f492f into main Nov 9, 2026
22 checks passed
@ctreatma
ctreatma deleted the ci/validate-pr-no-pull-request-target branch November 9, 2026 22:07
ctreatma added a commit to equinix/equinix-sdk-python that referenced this pull request Nov 10, 2026
## Summary
- `validate_pr` now triggers on `pull_request` with read-only
permissions and uploads the result (PR number and any error message) as
a short-lived artifact.
- New `validate_pr_comment` workflow runs on `workflow_run`, downloads
the artifact, and posts or clears the sticky PR comment. It never checks
out PR code; the PR number is reduced to digits and the error text is
only used as a comment body.
- Actions are pinned to commit SHAs.

- `.github/CODEOWNERS`: add a final `/.github/` rule assigning
`@equinix/governor-devrel-engineering`. It is last on purpose, since the
last matching pattern wins and earlier globs like `*fabricv*` also match
workflow files.

Same change as equinix/pulumi-equinix#365.

## Test plan
- [ ] After merge, open a PR with a non-conventional title and confirm
the check fails and the comment appears
- [ ] Fix the title and confirm the comment is removed
- [ ] Confirm a fork PR behaves the same

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
ctreatma added a commit to equinix/equinix-sdk-java that referenced this pull request Nov 10, 2026
## Summary
- `validate_pr` now triggers on `pull_request` with read-only
permissions and uploads the result (PR number and any error message) as
a short-lived artifact.
- New `validate_pr_comment` workflow runs on `workflow_run`, downloads
the artifact, and posts or clears the sticky PR comment. It never checks
out PR code; the PR number is reduced to digits and the error text is
only used as a comment body.
- Actions are pinned to commit SHAs.

- `.github/CODEOWNERS`: add a final `/.github/` rule assigning
`@equinix/governor-devrel-engineering`. It is last on purpose, since the
last matching pattern wins and earlier globs like `*fabricv*` also match
workflow files.

Same change as equinix/pulumi-equinix#365.

## Test plan
- [ ] After merge, open a PR with a non-conventional title and confirm
the check fails and the comment appears
- [ ] Fix the title and confirm the comment is removed
- [ ] Confirm a fork PR behaves the same

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
ctreatma added a commit to equinix/equinix-sdk-go that referenced this pull request Nov 10, 2026
## Summary
- `validate_pr` now triggers on `pull_request` with read-only
permissions and uploads the result (PR number and any error message) as
a short-lived artifact.
- New `validate_pr_comment` workflow runs on `workflow_run`, downloads
the artifact, and posts or clears the sticky PR comment. It never checks
out PR code; the PR number is reduced to digits and the error text is
only used as a comment body.
- Actions are pinned to commit SHAs.

- `.github/CODEOWNERS`: add a final `/.github/` rule assigning
`@equinix/governor-devrel-engineering`. It is last on purpose, since the
last matching pattern wins and earlier globs like `*fabricv*` also match
workflow files.

Same change as equinix/pulumi-equinix#365.

## Test plan
- [ ] After merge, open a PR with a non-conventional title and confirm
the check fails and the comment appears
- [ ] Fix the title and confirm the comment is removed
- [ ] Confirm a fork PR behaves the same

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants