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(github): Remote branch existence check #23480

Merged
merged 14 commits into from Jul 23, 2023

Conversation

zharinov
Copy link
Collaborator

@zharinov zharinov commented Jul 20, 2023

Changes

The problem is when we have branch foo/bar, HEAD request for foo will return 200.

To fix this, we first make another HEAD request with / suffix, and make sure it doesn't return 200 (otherwise, it means, nested refs exist).

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@zharinov zharinov requested review from viceice and rarkins July 20, 2023 15:33
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

otherwise LGTM

lib/modules/platform/github/index.ts Outdated Show resolved Hide resolved
lib/modules/platform/github/index.ts Outdated Show resolved Hide resolved
@zharinov zharinov marked this pull request as draft July 21, 2023 08:44
@zharinov zharinov marked this pull request as ready for review July 22, 2023 13:28
@zharinov zharinov requested a review from viceice July 22, 2023 13:28
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

please update PR body to match new behavior

lib/modules/platform/github/branch.ts Outdated Show resolved Hide resolved
viceice
viceice previously approved these changes Jul 22, 2023
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

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

ups, already done 👍

@viceice viceice enabled auto-merge July 23, 2023 09:51
@viceice
Copy link
Member

viceice commented Jul 23, 2023

you need to find the unresolved conversations 🙃

@viceice viceice added this pull request to the merge queue Jul 23, 2023
Merged via the queue into renovatebot:main with commit 9e77d59 Jul 23, 2023
36 checks passed
@viceice viceice deleted the fix/github-remote-branch-existence branch July 23, 2023 10:07
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 36.20.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
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.

GitHub PR creation fails silently with 422
3 participants