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): do not fail branch creation if it already exists #4471

Merged
merged 2 commits into from Dec 12, 2023

Conversation

caarlos0
Copy link
Member

github api is eventually consistent... so, we might ask for the branch, it might say it does't exist, and when we try and create it, it might error because it already exists.

this should avoid breaking it

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 12, 2023
Copy link

cloudflare-pages bot commented Dec 12, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7c4c5d5
Status: ✅  Deploy successful!
Preview URL: https://0568528f.goreleaser.pages.dev
Branch Preview URL: https://422-create-ref.goreleaser.pages.dev

View logs

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (233c4bc) 83.82% compared to head (7c4c5d5) 83.82%.
Report is 6 commits behind head on main.

Files Patch % Lines
internal/client/github.go 33.33% 3 Missing and 3 partials ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4471   +/-   ##
=======================================
  Coverage   83.82%   83.82%           
=======================================
  Files         135      135           
  Lines       12819    12821    +2     
=======================================
+ Hits        10745    10747    +2     
  Misses       1650     1650           
  Partials      424      424           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 12, 2023
@caarlos0 caarlos0 changed the title fix(github): do not fail if 422 fix(github): do not fail branch creation if it already exists Dec 12, 2023
@caarlos0 caarlos0 merged commit aa9986e into main Dec 12, 2023
11 of 12 checks passed
@caarlos0 caarlos0 deleted the 422-create-ref branch December 12, 2023 19:12
@github-actions github-actions bot added this to the v2.0.0 milestone Dec 12, 2023
@caarlos0 caarlos0 modified the milestones: v2.0.0, v1.23.0 Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant