Skip to content

[Buildbot] Add Buildbot build status badge#11938

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

[Buildbot] Add Buildbot build status badge#11938
LuxologyGG wants to merge 4 commits into
badges:masterfrom
LuxologyGG:feat/auto-badge-issue-6837

Conversation

@LuxologyGG

@LuxologyGG LuxologyGG commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Closes #6837

Summary

Adds a new Buildbot build status badge that queries a self-hosted Buildbot instance's REST API for the latest build result on a given builder.

Example

https://img.shields.io/buildbot/build/amd64-rhel8-dockerlibrary?baseUrl=https://buildbot.mariadb.org

Changes

  • Add services/buildbot/buildbot.service.js — fetches {baseUrl}/api/v2/builders/{builder}/builds?limit=1&order=-number and maps Buildbot result codes to badge status
  • Add services/buildbot/buildbot.service.spec.js — unit tests for URL building, result transformation, and rendering
  • Add services/buildbot/buildbot.tester.js — live and mocked integration tests

API rate limits

The Buildbot REST API documentation does not define request rate limits. Buildbot is self-hosted, so any throttling is configured by the operator (for example via a reverse proxy). This badge issues a single GET per request with limit=1.

Review feedback addressed

  • Fixed ESLint failures (no-unused-vars, sort-class-members, Prettier)
  • Rebased onto current master
  • Documented API rate-limit behavior in the service description and this PR body

Checklist

  • Service implementation (services/buildbot/buildbot.service.js)
  • Unit tests (services/buildbot/buildbot.service.spec.js)
  • Service tests (services/buildbot/buildbot.tester.js)
  • npm run test:core -- --grep Buildbot (15 passing)
  • npm run test:services -- --grep Buildbot (3 passing)
  • npm run lint (0 errors)

@github-actions

github-actions Bot commented Jun 18, 2026

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

Generated by 🚫 dangerJS against 048a798

@LuxologyGG LuxologyGG marked this pull request as ready for review June 19, 2026 02:58
Copilot AI review requested due to automatic review settings June 19, 2026 02:58

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.

@PyvesB

PyvesB commented Jun 21, 2026

Copy link
Copy Markdown
Member

Hello @LuxologyGG 👋🏻 What are the API rate limits?

@LuxologyGG

Copy link
Copy Markdown
Contributor Author

Hello @LuxologyGG 👋🏻 What are the API rate limits?

Same answer, the Buildbot REST API rate limits depend on the self-hosted instance. Since this targets user-hosted servers, there's no universal limit. Happy to add a note in the docs about it

@cursor cursor Bot force-pushed the feat/auto-badge-issue-6837 branch from fb7c2f8 to 157724f Compare June 23, 2026 20:01
cursor Bot pushed a commit to LuxologyGG/shields that referenced this pull request Jun 23, 2026
@LuxologyGG

Copy link
Copy Markdown
Contributor Author

The Buildbot REST API documentation does not document request rate limits. Buildbot is self-hosted, so any throttling is configured by the operator (for example via a reverse proxy in front of the web server; see the Web Server configuration docs).

This badge issues one GET request per badge render to {baseUrl}/api/v2/builders/{builder}/builds?limit=1&order=-number. I have documented this in the service description and updated the PR body accordingly.

I have also fixed the ESLint failures (no-unused-vars, sort-class-members, Prettier) and rebased onto current master.

@LuxologyGG LuxologyGG changed the title Add Buildbot build status badge [Buildbot] Add Buildbot build status badge Jun 24, 2026
@LuxologyGG LuxologyGG force-pushed the feat/auto-badge-issue-6837 branch from c7437c6 to 048a798 Compare June 28, 2026 18:07
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 - buildbot

4 participants