-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
APIs for pull requests #2253
Comments
Besides enumerated commands, we use the following PR API in GitLab:
We'd like to migrate to Gogs from Gitlab, but these api commands are required in our infrastructure (PR are accepted via an external utility). |
I just wanted to mention that I have written a Gogs Plugin for Jenkins to support Pipeline Multibranch and Org Scanning (auto creates project folders for repos and Pipeline projects for branches that have a Jenkinsfile in them). Initial release is available here: https://github.com/kmadel/gogs-branch-source-plugin/releases/tag/v0.1-alpha The biggest missing features is support for Pull Requests. Even without a webhook or a Rest API to interact with them - is there anyway to interact with PRs via plain vanialla Git? Thanks for the awesome work! |
By the way, I would like to mention that I believe Pull Requests should be able to be retrieved the same way that repo branches are (and the way GitHub does it):
And with at least the 'state' parameter to filter: |
@lstahlman OK, go ahead. |
Thanks! |
One implementing the API should probably orientate himself at this github api? |
That makes sense. I think most of the features requested here fit with that api, though some are dependent on related features that are still in progress (e.g., comments API). |
I also wanted to mention (and please correct me if I am wrong), but I don't believe it is even currently possible to get a list of Pull Request issues.
|
I am including the ability to pass options through /repos/:owner/:repo/pulls and I think there should be the same sort of support for issues. I was actually considering submitting a PR for that once I'm done with the initial work for the PR API. |
@lstahlman How far along are you on the PR API - and did you see this PR: #3547 Not quite as robust as what GitHub includes for PRs, but a simple start - I suppose you may already have something better. |
Yeah I saw that and am somewhat dependent on that PR getting accepted. I had my own version in dev, but it very closely matches what you submitted. I'm pretty far along on the basics (list, get, create, update). I was starting to add support for PR commit/file details, but I think I will split that into a separate contribution. |
@lstahlman Are you still working on this one? if so can you send a PR for what you have? 😃 |
I paused while waiting for #3547 & gogs/go-gogs-client#47 to be accepted, but I'll go ahead and post a WIP PR shortly so the code is out there. |
The WIP PRs I just posted implement the basic list, get, create, edit & merge features. I'm open to feedback and can add in extra bits where needed. I still need to finish the documentation markdown but should be able to post that in the next day or so. @kmadel this is going to conflict with your PR #3547 as I changed the API format of the PR struct to more closely match the Github API (there seems to be a bit of a push for this). |
FYI I updated the PR to include the documentation. It's lengthy so I won't cross-post it here. |
Along with the support of pull requests — if it's not already implemented — please, really please make it possible to
Both github and gitlab support this and it's one of the great features they share, and bitbucket lack of it is the most frustrating side of the tool. Don't be like bitbucket, be like the others! |
@hhenkel Brilliant! Just need the PR listing/creation/close/comment API and it's going to be 👌 |
BTW, if I may comment on the API structure, it's better to use a more RESTful structure:
my €0.02 |
@guyzmo Gogs is following the GitHub API as close as possible, so deviating from it by choice (for little reason) would not be merged. |
This is a good idea, as from my experience implementing git services APIs, I have to admit github API is a very good one (whether you name it the really necessary
the nice to haveyou can also get commit list (which is not really useful if you implement the
|
Any news? |
Particularly these commands are desired:
The text was updated successfully, but these errors were encountered: