Repository navigation
Document commit-trigger branch regexes and fork-safe Copr builds - #1182
Nitjsefnie wants to merge 3 commits into
Conversation
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 15s |
|
Heads-up: this branch lives in an organization-owned fork, and GitHub doesn't let maintainers push to those. If anything needs changing, just say so here and I'll make the change on this branch right away. |
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 10:57 AM UTC · Completed 11:10 AM UTC Commit: Runtime: claude · Model: opus → claude-opus-5-5 · Effort: high · Cost: $3.94 |
|
<!-- fullsend:risk-assessment --> DetailsSmall docs-only change (2 files, 54 lines) by a returning contributor, with no protected, security-sensitive, CI or dependency files and no recent churn or fix history; old files and long-open linked issues raise some sub-scores but the composite (1.47) rounds to 1. |
ReviewFindingsLow
Labels: Docs-only PR documenting Copr build branch-regex configuration and a fork Copr example. Next steps:
|
Co-Authored-By: GPT-6.1 Sol <[email protected]> Signed-off-by: Nitjsefnie <[email protected]>
Co-Authored-By: GPT-6.1 Sol <[email protected]> Signed-off-by: Nitjsefnie <[email protected]>
a07a67f to
b010b13
Compare
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 11s |
Explain how default and pull request branches are matched. Co-Authored-By: GPT-6.1 Terra <[email protected]> Signed-off-by: Nitjsefnie <[email protected]>
|
Build succeeded. ✔️ pre-commit SUCCESS in 1m 09s |
Summary
Document that the
branchoption of atrigger: commitPackit job accepts a Python regular expression — matching usesre.match, anchored at the start of the branch name (^unnecessary) and not required to consume the whole name, sobranch: mainalso matchesmain-fixandmain/probe— and add a worked example for getting Copr builds from a fork when the upstream config pins an explicit Coprowner/project: a second job withoutowner/project(Packit's default project naming works from a fork) with a distinctidentifier, restricted to non-default branches via a branch regex. It also states that an unsetbranchon a commit job uses the default branch name as the same regex, and that the pull_request target branch is matched the same way.Related Issues and Pull Requests
Fixes #664
Partially address #631
Changes
docs/configuration/upstream/copr_build.md: thebranchbullet now documents regex support with the exact matching semantics (start-anchoredre.match, partial match allowed), a plain-name example and its exact-name variant (main$), and a worked "every branch except the default" pattern^(?!main$).*. It also says an unsetbranchfalls back to the default branch name matched as the same regex (so an exact match needs an explicitbranch: <name>$), and that with pull_request the option is matched the same way against the PR's target branch.docs/configuration/examples.md: new "Running Copr builds from a fork without changing the upstream project" example — keep the upstream job with explicitowner/project, add a second job without them (default Copr naming), give both jobs distinctidentifiervalues, and split them with complementarymain$/^(?!main$).*branch filters; notes the regex-metacharacter escaping caveat for other default branch names and the remaining permission limitation for pushes to the fork'smain.Testing
Docs-only change; no runtime behavior changed. The example YAML parses (
yaml.safe_load), and the documented matching semantics were verified against packit-service's matching source (packit_service/worker/helpers/build/build_helper.pyusesre.match) and probed with Python. Fork CI green on the branch head 4ed8085: run 40682426904 on the fork, 1 job green, provenance echo naming that SHA.Footer
Generated by GLM-5.3-Flash (brief, orchestration), Claude Opus 5.5 (orchestration), GPT-6.1 Sol (implementation), GPT-6.1 Terra (implementation), GPT-6 Astra (review)