Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the function CanMaintainerWriteToBranch #30759

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

lunny
Copy link
Member

@lunny lunny commented Apr 29, 2024

This PR does some refactors.

  • Removed function GetFirstUnitRepoID() to match the comment
  • Add a headRepoID parameter to CanMaintainerWriteToBranch to replace removed GetFirstUnitRepoID() and rename it to CanUserWriteToBranch

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Apr 29, 2024
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 29, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 29, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Apr 29, 2024
@lunny lunny changed the title Refactor about maintainer edit Refactor the function CanMaintainerWriteToBranch Apr 29, 2024
@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 29, 2024
@wxiaoguang
Copy link
Contributor

Bug fix or pure-refactoring?

@lunny
Copy link
Member Author

lunny commented May 2, 2024

Bug fix or pure-refactoring?

pure-refactoring.

@wxiaoguang
Copy link
Contributor

Then defer it until 1.22 gets a stable release?

@wxiaoguang
Copy link
Contributor

And one more thing, any test?

@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 10, 2024
@delvh
Copy link
Member

delvh commented Jun 7, 2024

Then defer it until 1.22 gets a stable release?

1.22.0 has been released

@github-actions github-actions bot added modifies/translation modifies/api This PR adds API routes or modifies them modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/templates This PR modifies the template files modifies/docs modifies/migrations modifies/internal modifies/js modifies/dependencies labels Jun 11, 2024
@lunny lunny force-pushed the lunny/fix_maintainer_edit_check branch from 2e5d360 to 5aeca11 Compare June 12, 2024 10:53
@github-actions github-actions bot removed modifies/translation modifies/api This PR adds API routes or modifies them modifies/cli PR changes something on the CLI, i.e. gitea doctor or gitea admin modifies/templates This PR modifies the template files modifies/docs modifies/migrations modifies/internal modifies/js modifies/dependencies labels Jun 12, 2024
@lunny lunny marked this pull request as draft August 20, 2024 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/go Pull requests that update Go code size/L Denotes a PR that changes 100-499 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants