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

Display pull request head branch even the branch deleted or repository deleted #10413

Merged
merged 7 commits into from
Mar 2, 2020

Conversation

lunny
Copy link
Member

@lunny lunny commented Feb 22, 2020

This PR did some improvments.

  • Merge loadBaseRepo/getBaseRepo, loadHeadRepo/getHeadRepo on pull request
  • Only load once on loadHeadRepo if no system error
  • Use issue.Repo if possible
  • Display pull request head branch information even branch deleted or head repository deleted.
  • Get sha if possilbe, from pull/x/head

Fix #10347

@lunny lunny added type/enhancement An improvement of existing functionality backport/v1.11 labels Feb 22, 2020
@lunny lunny added this to the 1.12.0 milestone Feb 22, 2020
@ppmathis
Copy link

Thank you for implementing this feature request! As I would mainly need this functionality for Renovate as you correctly discovered, I would like to ask if this PR also exposes the head branch name through the API, specifically /api/v1/pulls and /api/v1/pulls/<PR>? Haven't tested it yet, but based on the diff view this currently looks like UI/view-only, is that correct?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 22, 2020
@lunny
Copy link
Member Author

lunny commented Feb 22, 2020

@ppmathis Updated. OK, now it should include headbranch information on API also.

Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

pleace update tests ...

@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 Feb 23, 2020
@lunny lunny force-pushed the lunny/display_deleted_branch branch from 5ca3874 to 9305bb8 Compare February 23, 2020 03:44
@lunny lunny force-pushed the lunny/display_deleted_branch branch from 9305bb8 to 402ea38 Compare February 23, 2020 14:58
@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 2, 2020
@codecov-io
Copy link

Codecov Report

Merging #10413 into master will increase coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10413      +/-   ##
==========================================
+ Coverage    43.7%   43.71%   +<.01%     
==========================================
  Files         585      585              
  Lines       82005    82005              
==========================================
+ Hits        35844    35848       +4     
+ Misses      41719    41716       -3     
+ Partials     4442     4441       -1
Impacted Files Coverage Δ
services/pull/patch.go 61.93% <0%> (-2.59%) ⬇️
services/pull/temp_repo.go 29.05% <0%> (-2.57%) ⬇️
services/pull/check.go 50% <0%> (-2.44%) ⬇️
modules/queue/workerpool.go 56.93% <0%> (-2.14%) ⬇️
routers/repo/view.go 36.82% <0%> (+0.67%) ⬆️
models/notification.go 64.71% <0%> (+0.83%) ⬆️
modules/log/event.go 65.64% <0%> (+1.02%) ⬆️
modules/indexer/issues/indexer.go 57.52% <0%> (+1.32%) ⬆️
modules/queue/unique_queue_disk_channel.go 55.76% <0%> (+1.92%) ⬆️
models/unit.go 39.5% <0%> (+2.46%) ⬆️
... 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 b30e093...9510230. Read the comment docs.

@zeripath zeripath merged commit 5abe1c5 into go-gitea:master Mar 2, 2020
@zeripath
Copy link
Contributor

zeripath commented Mar 2, 2020

Please send backport

@lunny lunny deleted the lunny/display_deleted_branch branch March 3, 2020 00:28
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.

[Feature] Expose name of deleted PR branches
7 participants