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

Native forgejo support #3684

Merged
merged 31 commits into from
Jun 1, 2024
Merged

Native forgejo support #3684

merged 31 commits into from
Jun 1, 2024

Conversation

qwerty287
Copy link
Contributor

I found a third-party fork of the gitea SDK: https://codeberg.org/mvdkleijn/forgejo-sdk

Closes #3637

@qwerty287 qwerty287 added feature add new functionality forge/forgejo forgejo forge related labels May 6, 2024
@qwerty287 qwerty287 marked this pull request as ready for review May 11, 2024 10:13
@qwerty287
Copy link
Contributor Author

Tested, seems working

@qwerty287 qwerty287 added this to the 2.6.0 milestone May 11, 2024
@qwerty287 qwerty287 requested a review from a team May 13, 2024 18:29
cmd/server/flags.go Outdated Show resolved Hide resolved
docs/docs/30-administration/11-forges/35-forgejo.md Outdated Show resolved Hide resolved
@xoxys
Copy link
Member

xoxys commented May 13, 2024

Nice work. Im a bit unsure about the sdk. Is it stable enough to rely on it? Does it anything different from the gitea sdk? As long as forgejo is api compatible we could still use the gitea sdk.

@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented May 13, 2024

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-3684.surge.sh

@6543
Copy link
Member

6543 commented May 13, 2024

forgejo as to be added to cSpell list

Copy link
Member

@jolheiser jolheiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few nits

server/services/setup.go Outdated Show resolved Hide resolved
server/forge/setup/setup.go Outdated Show resolved Hide resolved
server/forge/setup/setup.go Outdated Show resolved Hide resolved
@qwerty287
Copy link
Contributor Author

Nice work. Im a bit unsure about the sdk. Is it stable enough to rely on it? Does it anything different from the gitea sdk? As long as forgejo is api compatible we could still use the gitea sdk.

It's a fork of the gitea SDK and thus I'd say it's stable. It's not doing that much differently currently except renaming gitea to forgejo.

@pat-s
Copy link
Contributor

pat-s commented May 14, 2024

So man changes 👀

Maybe worth letting the maintainer know that his fork is now being used by WP?

@qwerty287
Copy link
Contributor Author

He does already: https://codeberg.org/mvdkleijn/forgejo-sdk/issues/2

@mvdkleijn
Copy link
Contributor

Hiya, maintainer of the forgejo sdk here..

Just wanted to let you know that the SDK is indeed a fork of the Gitea SDK. I made the fork after reading about Forgejo's hardfork since I thought that would make sense.

Right now, the fork is the same as the original. I even pulled in the latest updates not too long ago.

I plan to add convenience functions next to functions referencing the Forgejo api 1-on-1.

In general during the course of 1.x you can expect bug fixes, additions and cleanups. The SDK will use semver so if I make backwards incompatible changes, you can expect a major version bump.

I'll probably also add a vanity url for the SDK that people can optionally use so I can move the repo to a different forge if I ever need / want to.

My first order of business though is to make a woodpecker pipeline. I already setup WP locally to test the pipeline since I am new to WP.

Feel free to leave any feedback over at the repo. (sorry for temporarily hijacking this PR with my comment :-p )

Copy link
Contributor

@pat-s pat-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing all the work, @qwerty287!

Even though you tested it, maybe we should add a note in the release notes that this is "experimental" for now?

.cspell.json Outdated Show resolved Hide resolved
docs/docs/30-administration/11-forges/35-forgejo.md Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jun 1, 2024

Codecov Report

Attention: Patch coverage is 51.95402% with 418 lines in your changes are missing coverage. Please review.

Project coverage is 25.85%. Comparing base (f47f482) to head (1f255a1).
Report is 4 commits behind head on main.

Files Patch % Lines
server/forge/forgejo/forgejo.go 29.03% 323 Missing and 24 partials ⚠️
server/forge/forgejo/parse.go 63.23% 17 Missing and 8 partials ⚠️
server/forge/setup/setup.go 0.00% 19 Missing ⚠️
server/forge/forgejo/fixtures/handler.go 87.64% 9 Missing and 2 partials ⚠️
server/forge/forgejo/helper.go 94.97% 7 Missing and 3 partials ⚠️
server/services/setup.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3684      +/-   ##
==========================================
+ Coverage   24.99%   25.85%   +0.86%     
==========================================
  Files         357      361       +4     
  Lines       25767    26637     +870     
==========================================
+ Hits         6441     6888     +447     
- Misses      18833    19219     +386     
- Partials      493      530      +37     

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

@qwerty287 qwerty287 merged commit 91b122e into woodpecker-ci:main Jun 1, 2024
9 checks passed
@qwerty287 qwerty287 deleted the forejo branch June 1, 2024 09:23
@woodpecker-bot woodpecker-bot mentioned this pull request Jun 3, 2024
1 task
6543 pushed a commit to 6543-forks/woodpecker that referenced this pull request Sep 5, 2024
Co-authored-by: Robert Kaussow <[email protected]>
Co-authored-by: John Olheiser <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature add new functionality forge/forgejo forgejo forge related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ForgeJo icon for "Go to forge page" button
7 participants