gitea-plugin icon indicating copy to clipboard operation
gitea-plugin copied to clipboard

Add gitea release handling

Open Mai-Lapyst opened this issue 2 years ago • 2 comments

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

Mai-Lapyst avatar Aug 16 '22 19:08 Mai-Lapyst

Please fix lint errors

lafriks avatar Aug 16 '22 20:08 lafriks

Please fix lint errors

Should be fixed now

Mai-Lapyst avatar Aug 16 '22 21:08 Mai-Lapyst

Is this still a WIP or finished? (asking because there is quite some TODO left in code)

lafriks avatar Oct 12 '22 16:10 lafriks

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).

Mai-Lapyst avatar Oct 13 '22 01:10 Mai-Lapyst

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)

lafriks avatar Oct 31 '22 12:10 lafriks

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.

Mai-Lapyst avatar Oct 31 '22 19:10 Mai-Lapyst

any news on this when it will merged? this change would help us in handling releases with gitea.

RokkuCode avatar Dec 14 '22 17:12 RokkuCode

@lafriks are there blockers why this pr is not merged yet?

RokkuCode avatar Jan 08 '23 00:01 RokkuCode

Rebased pr to current master

Mai-Lapyst avatar Jan 08 '23 00:01 Mai-Lapyst

@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.

justusbunsi avatar Nov 27 '23 17:11 justusbunsi

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.

Mai-Lapyst avatar Jan 07 '24 23:01 Mai-Lapyst

@justusbunsi not to annoy, but plz pretty plz

(i'm looking forward to this feature)

AdamRGrey avatar Jan 23 '24 16:01 AdamRGrey

@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 avatar Jan 23 '24 17:01 justusbunsi

@justusbunsi Have added the requested changes; should work now :)

Mai-Lapyst avatar Jan 29 '24 10:01 Mai-Lapyst