-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add gitea support #759
Add gitea support #759
Conversation
✅ Deploy Preview for knope canceled.
|
another one is the failing test. I do not know why it adds that unicode symbol there... i can't find that anywhere in the files.
@dbanty would you know why this happens? |
Okay, this one makes a lot of sense now. The in-memory value uses |
Tested Release Workflow on https://codeberg.org/OpenThingies/openmood/releases this is after fixing the releases url |
https://codeberg.org/FallenValkyrie/testing/pulls/5 PR generated by knope on a copy of one of the projects i work on. (fixes will be pushed in a bit) generated release: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preliminary code check
docs/src/content/docs/reference/Config File/Steps/create-pull-request.md
Outdated
Show resolved
Hide resolved
docs/src/content/docs/reference/Config File/Steps/create-pull-request.md
Outdated
Show resolved
Hide resolved
docs/src/content/docs/reference/Config File/Steps/create-pull-request.md
Outdated
Show resolved
Hide resolved
There we go, that should be it. The Commit history is nice and clean, Everything is implemented and i can't find any additional thing i could correct. That makes this PR ready for review. 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this 🤩! I left some questions & suggestions in the review. Here are a few more that didn't belong to any particular file:
- There are probably more places where "GitHub" is mentioned that can be cleaned up to more generic forge lingo. I'll take a scan around on a later day.
- Semi-related, it seems like Gitea Actions is supposed to be compatible with GitHub Actions, does that mean that the release recipes preview release and workflow dispatch will work as is? If so, it'd be nice to update them to mention that Gitea can be used too.
- Do you think it's worth noting the relationship between Codeberg, Forgejo, and Gitea in the docs anywhere? Or is that relationship well known by their users (I had to look it up 😁)
- Can you add a test that verifies if multiple forges are configured they are all used?
Then, as a future follow-up, we probably should switch to a [[forges]]
array to maintain the multi-forge capabilities but with more concise config. Historically I also include an auto-upgrade option with a deprecation so it's easy to update config. Adding the host
option to GitHub isn't a bad idea either, for GitHub Enterprise.
mmmh... from my experience the people that use codeberg/forgejo know they are based on and fully compatible with gitea. But i think your idea to make this even more generic in the future might actually allow us to not have to. I'd say we mention Forgejo in the forge concept as a supported forge to be more clear.
mmh I'd say we test if we can get an equivalent configuration in gitea working. Tho hosting my own CI instance already stretches my money to its max, so rn i can't do it. Since I'm a proponent of testing/verifying before mentioning things in docs I'd leave that to be added a later day.
Sure can do ^^
There were a few github specific examples that could stand cleaning. I've scanned the docs during my first try and it was quite a lot. Tho i would like to keep some of the GitHub specific stuff, since it mentions the CLI.
I wanted to try this from the start, but it changed so much of the codebase that it would've been a pain to review. I do support doing that tho ^^ |
I just noticed that you merged this into a local branch. Since I accepted the invite, i would have access to that branch. My question is: how would you like me to continue? Would you like me to switch to the local branch within the repo or do it on the fork I'm already working on and only do future contributions here? |
I didn’t intentionally merge it anywhere 🧐. Maybe something automatic that GitHub did? You’re more than welcome to work on a branch in here or on your fork, whatever is easiest! |
There we go, that should (hopefully) fix the conflict. Tho when rebasing on main, i didn't get a conflict at all... |
# Conflicts: # .github/vale/config/vocabularies/Custom/accept.txt
Also, some style tweaks
Enforced that Gitea + assets aren't both declared and opened #779 to track adding in support (either manually with |
I could swear i did that... but it seems my brain never finished that thought... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR was created by Knope. Merging it will create a new release ### Features #### Gitea support PR #759 closed issue #743. Thank you, @FallenValkyrie! - Added Support for Gitea in the `CreatePullRequest` step - Added Support for Gitea in the `Release` step - Added A new `SelectGiteaIssue` step - Add support to generate Gitea config from known public Gitea instances To use these new steps, just add a new section to your configuration, like this: ```toml [gitea] repo = "knope" owner = "knope-dev" host = "https://codeberg.org" ``` You can now use the supported steps in the same way as their GitHub equivalents. > [!TIP] > Knope can now generate a configuration for you, if your repository's remote is one of the known public Gitea instances. Currently only [Codeberg](https://codeberg.org) is supported, but feel free to add more [here](https://github.com/knope-dev/knope/blob/main/src/config/toml/config.rs#L90). --------- Co-authored-by: GitHub <[email protected]> Co-authored-by: Dylan Anthony <[email protected]>
Took me a little longer, since i noticed that my initial idea would literally have required a full refactor, which was a little too large in scope. the above checklist is for keeping track of what will be added and this PR is here to track the progress and eventual questions.
closes #743
Plans
[gitea]
sectionCreatePullRequest
stepRelease
stepSelectGiteaIssue
forge
concept to the documentation to link forge integrations together in a convenient placegitea
section to the config file referenceTesting
https://codeberg.org/FallenValkyrie/testing/pulls/5
https://codeberg.org/FallenValkyrie/testing/releases/tag/v0.3.0
tests::gitea_release
andtests::generate
GITEA_TOKEN
Notes
ureq
(as far as i can tell) doesn't support sending multipart form data and the only library i could find,ureq_multipart
, panics on IO errors and has messages in chinese (see in its own codebase). Together i find those unacceptable design choices. issue: Support Multipart Forms algesten/ureq#698