Add workaround to get head branch sha of pulls with deleted head branch #498
No reviewers
Labels
No Label
has/backport
has/pull
in progress
invalid
kind/breaking
kind/bug
kind/build
kind/deployment
kind/docs
kind/enhancement
kind/feature
kind/lint
kind/proposal
kind/question
kind/refactor
kind/security
kind/testing
kind/translation
kind/ui
need/backport
priority/critical
priority/low
priority/maybe
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/go-sdk#498
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "6543/go-sdk:fix-empty-pull-head-sha"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
as title
@ -112,6 +119,11 @@ func (c *Client) ListRepoPullRequests(owner, repo string, opt ListPullRequestsOp
func (c *Client) GetPullRequest(owner, repo string, index int64) (*PullRequest, *Response, error) {
pr := new(PullRequest)
resp, err := c.getParsedResponse("GET", fmt.Sprintf("/repos/%s/%s/pulls/%d", owner, repo, index), nil, nil, pr)
if c.checkServerVersionGreaterThanOrEqual(version1_14_0) != nil {
Move the version check into fixPullHeadSha, so it's selfdocumenting?
Scratch that, I see why you did that now.
Maybe add a comment to
fixPullHeadSha
instead about the affected gitea versions?@noerw done