Skip to content

pull: Fix CODEOWNERS absolute path matching.#37244

Merged
silverwind merged 8 commits intogo-gitea:mainfrom
JoeGruffins:paths
Apr 17, 2026
Merged

pull: Fix CODEOWNERS absolute path matching.#37244
silverwind merged 8 commits intogo-gitea:mainfrom
JoeGruffins:paths

Conversation

@JoeGruffins
Copy link
Copy Markdown
Contributor

Patterns starting with "/" (e.g. /docs/.*.md) never matched because git returns relative paths without a leading slash. Strip the leading "/" before compiling the regex since the ^...$ anchoring already provides root-relative semantics.

closes #28107

Patterns starting with "/" (e.g. /docs/.*\.md) never matched because
git returns relative paths without a leading slash. Strip the leading
"/" before compiling the regex since the ^...$ anchoring already
provides root-relative semantics.
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 17, 2026
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 17, 2026
@silverwind
Copy link
Copy Markdown
Member

silverwind commented Apr 17, 2026

Worth flagging (out of scope here): after the fix, /docs/* and docs/* behave identically in Gitea, but GitHub distinguishes them — docs/* matches at any depth. Closing #28107 with this is fine for the narrow bug, but full GitHub parity is a design call (Gitea is regex-based, users rely on real regex features) worth its own issue.

Comment written by Claude Opus 4.7.

@silverwind silverwind added the backport/v1.26 This PR should be backported to Gitea 1.26 label Apr 17, 2026
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 17, 2026
@silverwind silverwind enabled auto-merge (squash) April 17, 2026 15:28
@silverwind silverwind added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 17, 2026
@wxiaoguang wxiaoguang disabled auto-merge April 17, 2026 15:35
@wxiaoguang wxiaoguang marked this pull request as draft April 17, 2026 15:35
Comment thread models/issues/pull_test.go Outdated
@wxiaoguang wxiaoguang removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 17, 2026
@lunny lunny mentioned this pull request Apr 17, 2026
22 tasks
@wxiaoguang wxiaoguang marked this pull request as ready for review April 17, 2026 20:46
@bircni
Copy link
Copy Markdown
Member

bircni commented Apr 17, 2026

@silverwind merge?

@silverwind silverwind merged commit 0161f30 into go-gitea:main Apr 17, 2026
26 checks passed
@GiteaBot GiteaBot added this to the 1.27.0 milestone Apr 17, 2026
GiteaBot added a commit to GiteaBot/gitea that referenced this pull request Apr 17, 2026
Patterns starting with "/" (e.g. /docs/.*\.md) never matched because git
returns relative paths without a leading slash. Strip the leading "/"
before compiling the regex since the ^...$ anchoring already provides
root-relative semantics.

Fixes: go-gitea#28107
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Apr 17, 2026
silverwind added a commit that referenced this pull request Apr 17, 2026
Backport #37244 by @JoeGruffins

Patterns starting with "/" (e.g. /docs/.*\.md) never matched because git
returns relative paths without a leading slash. Strip the leading "/"
before compiling the regex since the ^...$ anchoring already provides
root-relative semantics.

closes #28107

Co-authored-by: JoeGruffins <34998433+JoeGruffins@users.noreply.github.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 20, 2026
* main: (25 commits)
  Add WebKit to e2e test matrix (go-gitea#37298)
  Don't add useless labels which will bother changelog generation (go-gitea#37267)
  Fix Repository transferring page (go-gitea#37277)
  Stabilize issue-project e2e test, increase timeout factor (go-gitea#37297)
  Fix Mermaid diagrams failing when node labels contain line breaks (go-gitea#37296)
  Add project column picker to issue and pull request sidebar (go-gitea#37037)
  Fix container auth for public instance (go-gitea#37290)
  Refactor frontend `tw-justify-between` layouts to `flex-left-right` (go-gitea#37291)
  Update Nix flake (go-gitea#37284)
  Workflow Artifact Info Hover (go-gitea#37100)
  [skip ci] Updated translations via Crowdin
  release notes for 1.26.0 (go-gitea#37282)
  Enhance GetActionWorkflow to support fallback references (go-gitea#37189)
  Refactor LDAP tests (go-gitea#37274)
  Remove `SubmitEvent` polyfill (go-gitea#37276)
  Upgrade go-git to v5.18.0 (go-gitea#37268)
  Avoid top-level await (go-gitea#37272)
  Frontend iframe renderer framework: 3D models, OpenAPI (go-gitea#37233)
  pull: Fix CODEOWNERS absolute path matching. (go-gitea#37244)
  Swift registry metadata: preserve more JSON fields and accept empty metadata (go-gitea#37254)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/done All backports for this PR have been created backport/v1.26 This PR should be backported to Gitea 1.26 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Codeowners file doesn't support absolute paths

6 participants