Skip to content

test-pull-request.yml: 'codegen' base-branch filter has no effect #89

Description

@ptr727

Summary

.github/workflows/test-pull-request.yml declares:

```yaml
on:
pull_request:
branches: [ main, develop, codegen ]
```

pull_request.branches filters on the base ref of the PR, not the head. Codegen PRs are opened with head codegen-main / codegen-develop targeting base main / develop, so the codegen entry only matches a PR whose target is the codegen branch — which the workflow doesn't open anywhere. The entry is inert in practice and slightly misleading.

Suggested fix

Drop the codegen entry:

```yaml
on:
pull_request:
branches: [ main, develop ]
```

Codegen PRs targeting main/develop are already covered by those two entries.

Context

Found while applying the template's pattern to ptr727/NxWitness — Copilot's review caught it after I had naïvely added codegen-main/codegen-develop to the list. Verified by reading the GitHub Actions docs on pull_request.branches and by checking that codegen PR base refs in the template are main/develop.

If you want the workflow to actually fire on pushes to the codegen branches (not PRs targeting them), that needs a push: trigger or a workflow on a different event — but I suspect that wasn't the intent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions