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

Add /projects/{forge} API endpoint #1159

Merged

Conversation

lbarcziova
Copy link
Member

Needed for packit/dashboard#61

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

result = []
first, last = indices()

projects_list = GitProjectModel.get_forge(first, last, forge)
Copy link
Member

Choose a reason for hiding this comment

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

what's the expectation for the forge argument? https://github.com or github.com?

I'm wondering what would be the most convenient way for API users to use the endpoint

@@ -599,6 +599,18 @@ def test_get_project(clean_before_and_after, a_copr_build_for_pr):
assert project.project_url == "https://github.com/the-namespace/the-repo-name"


def test_get_forge(clean_before_and_after, multiple_forge_projects):
projects = GitProjectModel.get_forge(0, 10, "github.com")
Copy link
Member

Choose a reason for hiding this comment

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

oki, here's my answer :D

so will https://github.com work as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, this will not work, as in other similar methods

packit_service/service/api/projects.py Outdated Show resolved Hide resolved
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@lbarcziova lbarcziova added the mergeit When set, zuul wil gate and merge the PR. label Jul 15, 2021
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit a645d96 into packit:main Jul 15, 2021
@lbarcziova lbarcziova deleted the projects-forge-api branch September 11, 2022 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants