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

Make PR message on pushes configurable #10664

Merged
merged 3 commits into from Mar 8, 2020

Conversation

jolheiser
Copy link
Member

Resolves #5801

This PR adds a global config to enable/disable the new PR message on pushing

e.g.

remote: Create a new pull request for 'test2':
remote:   http://localhost:3000/Test2/tag/compare/master...test2

It also suppresses the message if the repo in question has PRs disabled.

Signed-off-by: jolheiser <john.olheiser@gmail.com>
@jolheiser jolheiser added the type/enhancement An improvement of existing functionality label Mar 8, 2020
@jolheiser jolheiser added this to the 1.12.0 milestone Mar 8, 2020
@@ -428,14 +429,14 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) {
branch = fmt.Sprintf("%s:%s", repo.OwnerName, branch)
}
results = append(results, private.HookPostReceiveBranchResult{
Message: true,
Message: setting.Git.PullRequestPushMessage && repo.AllowsPulls(),
Copy link
Member

Choose a reason for hiding this comment

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

I think that this would have been good enough, though.

Message: repo.AllowsPulls(),

Copy link
Member Author

Choose a reason for hiding this comment

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

I more or less agree, but we may as well make it configurable for those who don't want the extra messages.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 8, 2020
Signed-off-by: jolheiser <john.olheiser@gmail.com>
@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 Mar 8, 2020
@jolheiser
Copy link
Member Author

Ping mr lgtm

@jolheiser jolheiser merged commit de63ac0 into go-gitea:master Mar 8, 2020
@jolheiser jolheiser deleted the setting-pull-push branch March 8, 2020 13:34
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make Pull Request message from PR #4716 configurable
4 participants