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

fix(gitea): immortal PRs for Gitea #5998

Merged
merged 3 commits into from
Apr 21, 2020
Merged

fix(gitea): immortal PRs for Gitea #5998

merged 3 commits into from
Apr 21, 2020

Conversation

proton-ab
Copy link
Contributor

@proton-ab proton-ab commented Apr 18, 2020

Closes #6018

As per go-gitea/gitea#10413, Gitea now supports exposing name of deleted branch on closed PR, however this is done by label, not ref. (ref must always be a valid reference)

This PR changes toRenovatePR to always access label when fetching branch name, as it will contain proper branch name for both open and closed PRs.

This effectively solves the issue of Renovate recreating closed PRs on Gitea, however we should keep the immortal message until Gitea 1.12 is officially released.

The change is fully backwards compatible.

@proton-ab proton-ab changed the title Fix immortal PRs for Gitea fix(gitea): immortal PRs for Gitea Apr 18, 2020
@proton-ab proton-ab marked this pull request as draft April 18, 2020 21:40
@proton-ab proton-ab marked this pull request as ready for review April 18, 2020 22:39
@proton-ab
Copy link
Contributor Author

Pushed a fix to getPr which stops it from attempting to enrich closed PRs, because:

  • isBranchStale can not be called on branches that do not exist
  • isPRModified can not be called on closed PR with removed branch

@renovate-release
Copy link
Collaborator

🎉 This PR is included 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 this pull request may close these issues.

Wrong usage of Gitea API for fetching head branch name
3 participants