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

Add "Update Branch" button to Pull Requests #9784

Merged
merged 39 commits into from
Jan 17, 2020

Conversation

6543
Copy link
Member

@6543 6543 commented Jan 15, 2020

close #9750

Look

Bildschirmfoto zu 2020-01-17 02-00-04

Bildschirmfoto zu 2020-01-17 01-59-33

Changes

  • UI
    • CSS
    • Show Warning
    • Display update button if user has right to update
  • add go functions
    • use existing merge code
    • add a check to make sure there is a difference betwen the branches
    • remove dublicated code
  • Add & Fix Tests
    • add a new PR witch can be updated
    • test if update needed
    • update
    • test result

Future Improvements:

@6543

This comment has been minimized.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 16, 2020
@lunny lunny added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jan 16, 2020
@lunny lunny added this to the 1.12.0 milestone Jan 16, 2020
@lunny
Copy link
Member

lunny commented Jan 16, 2020

I would like to put it like below because the right space of the merge button will be used by manually merge hints.

图片

@codecov-io
Copy link

codecov-io commented Jan 16, 2020

Codecov Report

Merging #9784 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9784      +/-   ##
==========================================
- Coverage   42.35%   42.35%   -0.01%     
==========================================
  Files         604      604              
  Lines       79040    79041       +1     
==========================================
- Hits        33480    33475       -5     
- Misses      41447    41453       +6     
  Partials     4113     4113
Impacted Files Coverage Δ
cmd/dump.go 0% <0%> (ø) ⬆️
services/pull/check.go 54.54% <0%> (-2.1%) ⬇️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
models/gpg_key.go 55.03% <0%> (-0.56%) ⬇️
services/pull/patch.go 69.81% <0%> (+1.88%) ⬆️

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 f26c8b3...246748f. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Jan 17, 2020
@lafriks
Copy link
Member

lafriks commented Jan 17, 2020

Please update screenshot for blog post ;)

@6543
Copy link
Member Author

6543 commented Jan 17, 2020

sure

@lafriks lafriks changed the title Add "Update Branch" button to PR-View Add "Update Branch" button to Pull Requests Jan 17, 2020
@6543
Copy link
Member Author

6543 commented Jan 17, 2020

done

services/pull/update.go Outdated Show resolved Hide resolved
services/pull/update.go Outdated Show resolved Hide resolved
@6543
Copy link
Member Author

6543 commented Jan 17, 2020

@lunny done

@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 Jan 17, 2020
@6543
Copy link
Member Author

6543 commented Jan 17, 2020

I'm ready if you are 🚀

Copy link
Member

@guillep2k guillep2k left a comment

Choose a reason for hiding this comment

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

Great work! 🚀

routers/repo/pull.go Show resolved Hide resolved
}

// default merge commit message
message := fmt.Sprintf("Merge branch '%s' into %s", issue.PullRequest.BaseBranch, issue.PullRequest.HeadBranch)
Copy link
Member

Choose a reason for hiding this comment

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

This should be configurable via .ini or via Crowdin.

Copy link
Member

@lunny lunny Jan 17, 2020

Choose a reason for hiding this comment

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

But for this one, sometimes, we use English commit messages even if I'm using a Chinese User Interface.

Copy link
Member

Choose a reason for hiding this comment

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

We can use app.ini like we did with closing keywords and WIP...

@guillep2k
Copy link
Member

LGTM, but only two nit that can be addressed now if we'd like to.

@lafriks lafriks merged commit 36943e5 into go-gitea:master Jan 17, 2020
@6543
Copy link
Member Author

6543 commented Jan 17, 2020

@guillep2k it was to late :( ...

but now we can talk if we should localice merge commit ...

@GrayedFox
Copy link

GrayedFox commented May 26, 2020

Your friends from isaacs/github#1419 say hello 👋

They are wondering if now that the foundations have been laid, if the future improvements (in particular different Update Modis) might get some love. Cheers.

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
@delvh delvh removed the type/changelog Adds the changelog for a new Gitea version label Oct 7, 2023
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/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Update Branch" button on PR
10 participants