fix(gitlab): Use start_branch for file creation if branch doesn't exist already#4792
fix(gitlab): Use start_branch for file creation if branch doesn't exist already#4792caarlos0 merged 10 commits intogoreleaser:mainfrom
Conversation
…xist already Creating files on a new branch is only possible with the API if `start_branch` is given otherwise the API returns: > You can only create or edit files when you are on a branch Fixes goreleaser#4543
|
Sorry, this doesn't work yet because the file existence check might return 404 but that's because the new branch doesn't exist already not the file itself :( |
Having a fallback makes things way more complicated and doesn't really work in a world where we have at least `master` and `main` commonly used.
|
This turned out to be more complicated/bigger change than I've anticipated in the beginning. The problem was:
|
caarlos0
left a comment
There was a problem hiding this comment.
thank you so much for this!
made a couple of small comments, mostly log messages!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4792 +/- ##
==========================================
+ Coverage 83.77% 84.16% +0.39%
==========================================
Files 135 137 +2
Lines 13029 11078 -1951
==========================================
- Hits 10915 9324 -1591
+ Misses 1677 1300 -377
- Partials 437 454 +17 ☔ View full report in Codecov by Sentry. |
|
Let me try got get a review done early next week here as well :) |
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
caarlos0
left a comment
There was a problem hiding this comment.
second pass, a couple more small things
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
**Depends on #4792** This adds support for opening pull requests on brew, krew, nix, scoop and winget changes with Gitlab. --------- Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Creating files on a new branch is only possible with the API if
start_branchis given otherwise the API returns:
Fixes #4543