Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add block on pending codeowner reviews branch protection#34995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
Naxdy wants to merge2 commits intogo-gitea:main
base:main
Choose a base branch
Loading
fromNaxdy:work/codeowner-review

Conversation

Naxdy
Copy link
Contributor

@NaxdyNaxdy commentedJul 8, 2025
edited
Loading

This commit introduces a new branch protection rule that allows merge blocking if there are pending reviews from one or more code owners (as defined in any validCODEOWNERS file). This is determined by evaluating each rule present in theCODEOWNERS file individually. For every rule, at least one named code owner (or member of a code owner team) must have given an approving review for merging to be possible.

Closes#32602


This PR does NOT display code owners separately from other reviewers (#28137), as I think it makes sense to do that in a separate PR, as it doesn't require any database migrations.

Screenshot

Pull Request
Branch Protection Rule

Unresolved questions

  • Does this warrant a doc change?

anbraten, lunny, and ankurk91 reacted with thumbs up emoji
@GiteaBotGiteaBot added the lgtm/need 2This PR needs two approvals by maintainers to be considered for merging. labelJul 8, 2025
@github-actionsgithub-actionsbot added modifies/translation modifies/apiThis PR adds API routes or modifies them modifies/goPull requests that update Go code modifies/templatesThis PR modifies the template files modifies/migrations labelsJul 8, 2025
@NaxdyNaxdyforce-pushed thework/codeowner-review branch 5 times, most recently from7ff6bd4 to7141adeCompareJuly 8, 2025 13:01
@NaxdyNaxdy marked this pull request as ready for reviewJuly 8, 2025 13:02
@NaxdyNaxdyforce-pushed thework/codeowner-review branch 2 times, most recently from39ba543 to18cce17CompareJuly 11, 2025 16:43
@lunnylunny added this to the1.25.0 milestoneJul 11, 2025
@lunnylunny added the type/enhancementAn improvement of existing functionality labelJul 11, 2025
@NaxdyNaxdy requested a review fromlunnyJuly 11, 2025 21:00
@NaxdyNaxdyforce-pushed thework/codeowner-review branch 3 times, most recently froma5035a7 to5df3166CompareJuly 12, 2025 08:42

hasApprovals := true

for _, rule := range rules {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The logic appears overly complex and doesn’t seem correct. I ran a test, and it didn’t work as expected. Could you please rewrite it to make it clearer and more readable?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I ran a test, and it didn’t work as expected.

Can you give me more info about that, like the codeowner file you used and what you expected vs. what happened?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Also went and amended it to be a bit more concise. The behavior should be unchanged though, so I'd still be interested in your findings.

@NaxdyNaxdyforce-pushed thework/codeowner-review branch 2 times, most recently from9b575f8 tob448f2cCompareJuly 15, 2025 08:58
@NaxdyNaxdyforce-pushed thework/codeowner-review branch fromb448f2c toe01ac3dCompareJuly 15, 2025 09:03
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@lunnylunnylunny left review comments

Assignees
No one assigned
Labels
lgtm/need 2This PR needs two approvals by maintainers to be considered for merging.modifies/apiThis PR adds API routes or modifies themmodifies/goPull requests that update Go codemodifies/migrationsmodifies/templatesThis PR modifies the template filesmodifies/translationtype/enhancementAn improvement of existing functionality
Projects
None yet
Milestone
1.25.0
Development

Successfully merging this pull request may close these issues.

Code Owners feature not enforceable
3 participants
@Naxdy@lunny@GiteaBot

[8]ページ先頭

©2009-2025 Movatter.jp