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

[Feature] Expose name of deleted PR branches #10347

Closed
5 of 7 tasks
ppmathis opened this issue Feb 18, 2020 · 3 comments · Fixed by #10413
Closed
5 of 7 tasks

[Feature] Expose name of deleted PR branches #10347

ppmathis opened this issue Feb 18, 2020 · 3 comments · Fixed by #10413
Assignees
Labels
type/enhancement An improvement of existing functionality
Milestone

Comments

@ppmathis
Copy link

Description

When the head branch of a pull request in either state gets deleted, the pull request no longer exposes the original branch name. This is directly related to #9158, which requested tracking the ref to the tip of the deleted branch and a working commit/changes view.

I would like to suggest to also expose the name of the branch which got deleted through both UI and API instead of just showing from deleted into <target branch>. The name of the branch can usually be accessed as head.ref in the API, however the whole head property is null as soon as the branch got deleted.

Screenshots

PR with correct branch name before branch deletion

before branch deletion

PR with missing branch name after branch deletion

after branch deletion

@lunny
Copy link
Member

lunny commented Feb 19, 2020

Because that branch maybe from another repository which deleted.

@lafriks
Copy link
Member

lafriks commented Feb 19, 2020

We should probably display branch name even if it is deleted just without link and marked as deleted

@ppmathis
Copy link
Author

ppmathis commented Feb 19, 2020

@lafriks That's the kind of behavior I'd expect - even when the branch or repository got deleted, the PR should still expose the original branch name through UI and API.

This also follows the implementation of all other major Git platforms including GitHub and is useful for stateless bots which can determine if a PR has been previously opened by checking for a predictable branch name.

@lunny lunny added the type/enhancement An improvement of existing functionality label Feb 22, 2020
@lunny lunny added this to the 1.11.2 milestone Feb 22, 2020
@lunny lunny self-assigned this Feb 22, 2020
@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
type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants