[Copr] Add build status badge - #11940
Conversation
|
8121c83 to
4d12e2c
Compare
1ce9ed7 to
fcba49b
Compare
0e5f975 to
480f535
Compare
18d0963 to
2abbe24
Compare
Implements a build badge for the Fedora Copr build system using the Copr API v3 package endpoint. Closes badges#6078
Move fetch method before transform to satisfy ESLint sort-class-members rule.
Simplify the user-facing description, inline URL construction, drop parameter descriptions and non-bespoke helper/render specs, and remove the mocked tester in favor of live coverage.
acaf823 to
4ee55a7
Compare
|
Hi @LuxologyGG 👋🏻 Do you have other examples of servers aside from https://copr.fedorainfracloud.org? I'd like to test things out on different examples. |
|
Hi @PyvesB — yes. The Copr project documents three public instances in the user documentation:
The badge accepts an optional Staging (same package as the Fedora example): API check: openEuler: API check: same endpoint shape → Swagger for each instance lives at |
Covers the optional server query parameter against a documented public non-Fedora instance for maintainer review.
| }, | ||
| ), | ||
| queryParam({ | ||
| name: 'server', |
|
|
||
| const description = ` | ||
| Shows the latest build status for a package on | ||
| [COPR](https://copr.fedorainfracloud.org/). |
There was a problem hiding this comment.
Given this URL can be customised, I'd suggest making the wording more general, e.g.:
| [COPR](https://copr.fedorainfracloud.org/). | |
| a Copr instance, for example [Fedora Copr](https://copr.fedorainfracloud.org/). |
Summary
Adds a new build status badge for the Fedora Copr build system. The optional
serverquery parameter also works against other public Copr instances.Closes #6078
Example
Badge endpoint
/copr/build/:owner/:project/:packageOptional
serverquery parameter defaults tohttps://copr.fedorainfracloud.org.Public instances documented by Copr: Fedora, Fedora staging (data periodically deleted), and openEuler. See the Copr user documentation.
API rate limits
The Copr API v3 documentation does not document request rate limits for read-only endpoints. This badge issues one GET per render to
/api_3/packagewithwith_latest_build=True.Implementation
services/copr/copr.service.js— fetches latest build state from Copr API v3services/copr/copr.service.spec.js— unit tests for build-state transformationservices/copr/copr.tester.js— live service tests (Fedora + openEuler)Checklist
services/copr/copr.service.js)services/copr/copr.service.spec.js)services/copr/copr.tester.js)npm run test:core -- --grep Copr(6 passing)npm run test:services -- --grep Copr(4 passing)npm run lint(0 errors)