gitea-plugin
gitea-plugin copied to clipboard
Add gitea release handling
This PR adds the ability to discover releases in gitea as "branches" to be build seperatly.
It also adds an task for pipelines ("publishGiteaAssets") which works a little like copyArtifacts but uploads artifacts as an asset to the current building release.
The PR also contains an (toggleable) feature to "map" artifacts originally created via copyArtifacts to gitea release assets.
Relevant issues:
- [x] Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
Please fix lint errors
Please fix lint errors
Should be fixed now
Is this still a WIP or finished? (asking because there is quite some TODO left in code)
Is this still a WIP or finished? (asking because there is quite some TODO left in code)
It's finished. I left the TODO's mostly there to note things for future additions or to match the rest of the file (in case of MockGiteaConnection).
I would say draft releases should be skipped and removed from this as in the future it's planned that gitea won't issue webhooks for draft releases (go-gitea/gitea#21594)
I would say draft releases should be skipped and removed from this as in the future it's planned that gitea won't issue webhooks for draft releases (go-gitea/gitea#21594)
Yeah makes sense; will update the PR in the coming days.
any news on this when it will merged? this change would help us in handling releases with gitea.
@lafriks are there blockers why this pr is not merged yet?
Rebased pr to current master
@Mai-Lapyst @lafriks As mentioned in #67, my apologies for not responding earlier. I received the "review requested" notification back then and simply missed acting upon it after reading it. Reviewing and testing your changes now.
Added a additional patch since the generation of the url for fetching releases was still not correct; but this time bc gitea interprets draft=true
as a way to ONLY include drafts in the response. Should be fixed now by only specifing draft=false
when no drafts should be fetched. Same goes for the pre-release flag.
@justusbunsi not to annoy, but plz pretty plz
(i'm looking forward to this feature)
@justusbunsi not to annoy, but plz pretty plz
(i'm looking forward to this feature)
I'll review until the end of week. My daily schedule did not allow rewiewing earlier. Should've commented earlier. 🙂
@justusbunsi Have added the requested changes; should work now :)