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

Repo name added to automatically generated commit message when mergin… #9997

Merged
merged 8 commits into from Jan 28, 2020

Conversation

@sd1998
Copy link
Contributor

sd1998 commented Jan 26, 2020

Fix for issue #9898.

Copy link
Contributor

zeripath left a comment

Small nit but otherwise approve.

models/pull.go Outdated Show resolved Hide resolved
@zeripath

This comment has been minimized.

Copy link
Contributor

zeripath commented Jan 26, 2020

The current behaviour is actually completely specified as you can't have more than one fork of a repo and can't pr from something that isn't a fork. See the top of this page on GH right now...

However I can see that it is confusing.

If we're going to go for fully specified repo names then we should have a different separator between branch and repo name. Either colon or space.

Whatever we choose it should then propagate through to the compare page.

At present I think that uses a colon so colon is recommendeded.

@sd1998 sd1998 force-pushed the sd1998:Fix-9898 branch from affc877 to 5eb95f3 Jan 26, 2020
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 26, 2020

Codecov Report

Merging #9997 into master will decrease coverage by <.01%.
The diff coverage is 54.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9997      +/-   ##
==========================================
- Coverage   42.27%   42.26%   -0.01%     
==========================================
  Files         610      611       +1     
  Lines       80375    80394      +19     
==========================================
  Hits        33979    33979              
- Misses      42218    42237      +19     
  Partials     4178     4178
Impacted Files Coverage Δ
services/pull/review.go 0% <0%> (ø) ⬆️
routers/repo/commit.go 29.66% <0%> (ø) ⬆️
modules/migrations/gitea.go 6.14% <0%> (-0.02%) ⬇️
routers/repo/pull.go 28.7% <0%> (-0.37%) ⬇️
services/gitdiff/gitdiff.go 67.62% <100%> (+1.36%) ⬆️
models/issue_milestone.go 67.9% <100%> (+0.23%) ⬆️
modules/git/diff.go 62.03% <62.03%> (ø)
services/pull/temp_repo.go 31.62% <0%> (-2.57%) ⬇️
services/pull/check.go 54.54% <0%> (-2.1%) ⬇️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4234db2...771871a. Read the comment docs.

models/pull.go Outdated Show resolved Hide resolved
@zeripath

This comment has been minimized.

Copy link
Contributor

zeripath commented Jan 26, 2020

Actually we should use FullName() for this. (That might make backporting a bit of a problem as we've made a small improvement in master/1.12-dev whereby the repo.OwnerName is stored on the repo table.

@sd1998 sd1998 force-pushed the sd1998:Fix-9898 branch from 5eb95f3 to 81f1092 Jan 26, 2020
@GiteaBot GiteaBot added lgtm/done and removed lgtm/need 1 labels Jan 26, 2020
lafriks and others added 3 commits Jan 26, 2020
@@ -185,7 +185,7 @@ func (pr *PullRequest) GetDefaultMergeMessage() string {
log.Error("Cannot load issue %d for PR id %d: Error: %v", pr.IssueID, pr.ID, err)

This comment has been minimized.

Copy link
@lunny

lunny Jan 27, 2020

Member

I would like to confirm if the head repository is the same as the base repository. Then return different message. When that is the same repository, we could ignore %s/%s:

This comment has been minimized.

Copy link
@zeripath

zeripath Jan 27, 2020

Contributor

@lunny take a look I've just pushed some changes up.

zeripath added 2 commits Jan 27, 2020
@6543
6543 approved these changes Jan 27, 2020
@zeripath zeripath dismissed lunny’s stale review Jan 28, 2020

Review is stale

@zeripath zeripath merged commit a08175a into go-gitea:master Jan 28, 2020
2 checks passed
2 checks passed
approvals/lgtm this commit looks good
continuous-integration/drone/pr Build is passing
Details
@zeripath

This comment has been minimized.

Copy link
Contributor

zeripath commented Jan 28, 2020

Please send backport

zeripath added a commit to zeripath/gitea that referenced this pull request Feb 15, 2020
go-gitea#9997)

* Repo name added to automatically generated commit message when merging pull request

* As per @lunny

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
zeripath added a commit that referenced this pull request Feb 15, 2020
#9997) (#10285)

* Repo name added to automatically generated commit message when merging pull request

* As per @lunny

Co-authored-by: Shashvat Kedia <sk261@snu.edu.in>
Co-authored-by: Lauris BH <lauris@nix.lv>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants
You can’t perform that action at this time.