-
Notifications
You must be signed in to change notification settings - Fork 66
Forgejo PRs support #925
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
Forgejo PRs support #925
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Build succeeded. ✔️ pre-commit SUCCESS in 3m 34s |
ogr/services/forgejo/pull_request.py
Outdated
|
||
@staticmethod | ||
def get_list( | ||
project: "forgejo.ForgejoProject", | ||
status: PRStatus = PRStatus.open, | ||
) -> list["PullRequest"]: | ||
raise NotImplementedError("TBD") | ||
prs = project.api.repo_list_pull_requests( |
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.
How's the pagination? I think it should be paginated + iterable (not a list)
ogr/services/forgejo/pull_request.py
Outdated
def add_label(self, *labels: str) -> None: | ||
raise NotImplementedError("Not possible via Forgejo API.") | ||
|
||
def get_all_commits(self) -> list[str]: |
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.
I'd expect pagination + iterable here too
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.
I was considering it (and the same for the get_list
), but I think it then conflicts with the naming of these methods and the user expectations that result from that. WDYT?
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.
Makes sense to me, though you still need to paginate :/
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.
PTAL
This comment was marked as outdated.
This comment was marked as outdated.
7bb3239
to
636b158
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Co-authored-by: Matej Focko <mfocko@users.noreply.github.com>
Build succeeded. ✔️ pre-commit SUCCESS in 3m 45s |
Build succeeded (gate pipeline). ✔️ pre-commit SUCCESS in 3m 35s |
f68be67
into
packit:main
TODO:
Fixes #879
RELEASE NOTES BEGIN
Support for Forgejo pull requests has been added.
RELEASE NOTES END