Skip to content

fix(ci): run the Go workflow on pull_request - #246

Merged
SyniRon merged 1 commit into
developfrom
fix/issue-245-ci-pull-request-trigger
Jul 27, 2026
Merged

fix(ci): run the Go workflow on pull_request#246
SyniRon merged 1 commit into
developfrom
fix/issue-245-ci-pull-request-trigger

Conversation

@SyniRon

@SyniRon SyniRon commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Closes #245.

.github/workflows/go.yml triggered on push only. A contributor without push access forks, pushes to their fork, and opens a PR — the push event fires in their repo, so the Build/Lint/Test runs attach to the fork and never reach the PR here. Since #243 made those contexts required with no bypass actors, such a PR would be permanently unmergeable.

No fork PR has ever been opened against this repo (last 100 are all 7Cav-owned branches), so this has never fired. It is now a hard block rather than a soft one, which is what makes it worth closing.

Why push is narrowed rather than left alone

Appending pull_request to the existing on: [push] would be the obvious change and the wrong one: a same-repo PR matches both events, so the whole suite would run twice per PR and each required context would appear twice — exactly the ambiguity that makes required status checks unreliable.

Scoping push to develop gives one run per event:

Event Before After
Push to a feature branch runs no run
Open / update a PR no run (checks came from the push) runs
Fork PR no checks at all runs
Merge to develop runs runs

Trade-off worth naming: pushing a feature branch no longer runs CI until a PR exists. The ruleset requires a PR for every change, so nothing reaches develop unchecked — but you will see CI slightly later in the loop than before.

The workflow references no secrets (checkout, go mod tidy, go build, make lint, go test against a MariaDB service container), so it runs correctly under the read-only token a fork PR receives. Service containers are available to fork PRs.

Self-verifying

This PR is itself the test: if the pull_request trigger works, Build/Lint/Test appear below from a pull_request run rather than a push run. What it cannot prove is the fork path specifically — that needs an actual fork PR.

This was generated by AI

The workflow triggered on `push` only. A contributor without push access
forks, pushes to their fork, and opens a PR — the push event fires in
their repo, so the Build/Lint/Test runs attach there and never reach the
PR here. With those contexts required and no bypass actors since #243,
such a PR is permanently unmergeable. No fork PR has ever been opened
against this repo, so this has not fired; it is now a hard block rather
than a soft one, which is what makes it worth closing.

`push` is narrowed to develop rather than left bare alongside the new
trigger. A same-repo PR matches both events, so an unscoped `push` would
run the whole suite twice per PR and surface each required context twice
— the ambiguity that makes required checks unreliable. One run per event
now: PRs via `pull_request`, develop keeps its post-merge run.

Trade-off: pushing a feature branch no longer runs CI until a PR exists.
The ruleset requires a PR for every change, so nothing reaches develop
unchecked.

The workflow references no secrets, so it runs correctly under the
read-only token a fork PR receives.

> *This was generated by AI*
@SyniRon
SyniRon merged commit 6582704 into develop Jul 27, 2026
4 checks passed
@SyniRon
SyniRon deleted the fix/issue-245-ci-pull-request-trigger branch July 27, 2026 21:24
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.

fix(ci): run Go workflow on pull_request so fork PRs can satisfy required checks

1 participant