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

Wrong usage of Gitea API for fetching head branch name #6018

Closed
proton-ab opened this issue Apr 20, 2020 · 3 comments · Fixed by #5998
Closed

Wrong usage of Gitea API for fetching head branch name #6018

proton-ab opened this issue Apr 20, 2020 · 3 comments · Fixed by #5998

Comments

@proton-ab
Copy link
Contributor

What Renovate type are you using?
Self-hosted, Gitea.

Describe the bug
Renovate looks up at ref in order to fetch the name of head branch for Gitea PR, however that field will point to unnamed reference when branch is removed.

Did you see anything helpful in debug logs?
No

To Reproduce
Using Gitea 1.12 as of commit 3d7d828a35dc187ae56c62fc438715d3dee78f3f

  • Create basic repository and set it up
  • Have Renovate run on it and create PR
  • Close the PR
  • Renovate will see closed PR and remove the branch
  • On next run, Renovate can no longer identify PR that was closed and create new one

Additional context
Gitea added ability for deleted branches names to be retained in go-gitea/gitea#10413, this issue affects only Gitea versions >= 1.12.

Gitea API exposes two fields of interest for Renovate for head branch on PR - ref and label. Usually when PR is open and branch exist, both of them contain same information - branch name. When PR is closed and branch removed, label still contains the correct branch name, while ref points at unnamed reference within Git repository.

I have opened PR to fix this in #5998, this issue is for tracking purposes only.

@rarkins
Copy link
Collaborator

rarkins commented Apr 21, 2020

@proton-ab thanks for the fix!

@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 19.216.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants