Skip to content

[Copr] Add build status badge - #11940

Open
LuxologyGG wants to merge 10 commits into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-6078
Open

[Copr] Add build status badge#11940
LuxologyGG wants to merge 10 commits into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-6078

Conversation

@LuxologyGG

@LuxologyGG LuxologyGG commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new build status badge for the Fedora Copr build system. The optional server query parameter also works against other public Copr instances.

Closes #6078

Example

https://img.shields.io/copr/build/msuchy/nanoblogger/nanoblogger
https://img.shields.io/copr/build/@copr/copr/copr-backend
https://img.shields.io/copr/build/mywaaagh_admin/i3wm/acpi?server=https://eur.openeuler.openatom.cn
https://img.shields.io/copr/build/msuchy/nanoblogger/nanoblogger?server=https://copr.stg.fedoraproject.org

Badge endpoint

/copr/build/:owner/:project/:package

Optional server query parameter defaults to https://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/package with with_latest_build=True.

Implementation

  • services/copr/copr.service.js — fetches latest build state from Copr API v3
  • services/copr/copr.service.spec.js — unit tests for build-state transformation
  • services/copr/copr.tester.js — live service tests (Fedora + openEuler)

Checklist

  • Service implementation (services/copr/copr.service.js)
  • Unit tests (services/copr/copr.service.spec.js)
  • Service tests (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)

@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
Messages
📖 ✨ Thanks for your contribution to Shields, @LuxologyGG!

Generated by 🚫 dangerJS against 3992fde

@LuxologyGG
LuxologyGG marked this pull request as ready for review June 20, 2026 00:36
Copilot AI review requested due to automatic review settings June 20, 2026 00:36

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@cursor
cursor Bot force-pushed the feat/auto-badge-issue-6078 branch from 8121c83 to 4d12e2c Compare June 24, 2026 18:06
@LuxologyGG
LuxologyGG force-pushed the feat/auto-badge-issue-6078 branch from 1ce9ed7 to fcba49b Compare June 28, 2026 18:07
@cursor
cursor Bot force-pushed the feat/auto-badge-issue-6078 branch 2 times, most recently from 0e5f975 to 480f535 Compare July 5, 2026 18:06
@LuxologyGG
LuxologyGG force-pushed the feat/auto-badge-issue-6078 branch from 18d0963 to 2abbe24 Compare July 16, 2026 18:06
cursoragent and others added 8 commits July 19, 2026 18:05
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.
@LuxologyGG
LuxologyGG force-pushed the feat/auto-badge-issue-6078 branch from acaf823 to 4ee55a7 Compare July 19, 2026 18:05
@PyvesB

PyvesB commented Jul 20, 2026

Copy link
Copy Markdown
Member

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.

@LuxologyGG

Copy link
Copy Markdown
Contributor Author

Hi @PyvesB — yes. The Copr project documents three public instances in the user documentation:

Instance Notes
https://copr.fedorainfracloud.org Default Fedora Copr (examples already in this PR)
https://copr.stg.fedoraproject.org Fedora staging; data is periodically deleted
https://eur.openeuler.openatom.cn openEuler community Copr

The badge accepts an optional server query parameter (defaults to Fedora Copr). I verified API v3 package lookups on the non-default instances:

Staging (same package as the Fedora example):

https://img.shields.io/copr/build/msuchy/nanoblogger/nanoblogger?server=https://copr.stg.fedoraproject.org

API check: GET .../api_3/package?...&with_latest_build=Truestate=succeeded.

openEuler:

https://img.shields.io/copr/build/mywaaagh_admin/i3wm/acpi?server=https://eur.openeuler.openatom.cn

API check: same endpoint shape → state=succeeded for mywaaagh_admin/i3wm/acpi (also dmenu, i3status, i3lock).

Swagger for each instance lives at {server}/api_3/docs/. Happy to add an openEuler live tester case if that would help review.

Covers the optional server query parameter against a documented
public non-Fedora instance for maintainer review.
},
),
queryParam({
name: 'server',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be called baseUrl, as per #10806.


const description = `
Shows the latest build status for a package on
[COPR](https://copr.fedorainfracloud.org/).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Given this URL can be customised, I'd suggest making the wording more general, e.g.:

Suggested change
[COPR](https://copr.fedorainfracloud.org/).
a Copr instance, for example [Fedora Copr](https://copr.fedorainfracloud.org/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Badge request: Copr Build System

4 participants