Skip to content

feat: add [MacPortsVersion] badge#11807

Open
Shaz666 wants to merge 4 commits into
badges:masterfrom
Shaz666:feat/macports-version-badge
Open

feat: add [MacPortsVersion] badge#11807
Shaz666 wants to merge 4 commits into
badges:masterfrom
Shaz666:feat/macports-version-badge

Conversation

@Shaz666
Copy link
Copy Markdown
Contributor

@Shaz666 Shaz666 commented Apr 22, 2026

Adds a version badge for MacPorts ports.

Fetches JSON from https://ports.macports.org/api/v1/ports/:portName/ and extracts the version field.

Example: /macports/v/gitv2.47.1

Closes #9588

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

Messages
📖 ✨ Thanks for your contribution to Shields, @Shaz666!

Generated by 🚫 dangerJS against ae17fac

@PyvesB PyvesB changed the title feat: Shaz666 add MacPorts version badge Closes #9588 feat: add [MacPortsVersion] badge Apr 26, 2026
Copy link
Copy Markdown
Member

@PyvesB PyvesB Apr 26, 2026

Choose a reason for hiding this comment

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

Could you please switch to non-mocked tests, i.e. using real data and API calls? See https://github.com/badges/shields/blob/master/doc/service-tests.md for more information. :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @PyvesB , thanks for the feedback! I tried switching to live tests but ran into an issue — ports.macports.org appears to be unreachable from the GitHub Actions CI runners. Both the valid and not-found tests consistently time out when hitting the real API, even though the API itself works fine when accessed directly.

I've verified the service code is correct and the API returns the expected response format, so I belive it's purely a connectivity issue from the CI environment rather than a problem with the implementation.

I've reverted back to mocked tests for now. Happy to switch to live tests if there's a way to work around the connectivity issue, or if there's a preferred approach for services where the upstream API isn't accessible from CI. Let me know how you'd like to proceed! Really appreciate your review and guidance with this!

Copy link
Copy Markdown
Member

@PyvesB PyvesB May 11, 2026

Choose a reason for hiding this comment

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

That's pretty odd. Perhaps we could still have a live test or two in addition to the mocked ones, but with .skipWhen(() => process.env.GITHUB_ACTIONS === 'true'), so that we they are still run when launched locally?

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.

macports version

2 participants