Shields.io badges don't work on AutomationHub #202
-
Hello, I'd like to show a badge with the latest version of our collection on the README page of its GitHub repo. I have this working for Ansible Galaxy using the badges from shields.io: Shields.io presents a badge with "galaxy | v1.0.2" based on the JSON returned by a GET to this URL: https://galaxy.ansible.com/api/v2/collections/ibm/ibm_zhmc/ For Ansible AutomationHub, I found a similar query that returns the latest version: https://console.redhat.com/api/automation-hub/v3/collections/ibm/ibm_zhmc/ But when I use this for shields.io to define the badge, the badge shows "hub | invalid": I suspected this has to do with either blocking the traffic or missing authentication, and after a few attempts to get rid of any auth context of my browser, I could verify that it is an authentication issue. When you are sufficiently logged out from Hub, the URL above results in "Missing Authentication" being shown by the browser, so supposedly a HTTP 403. Is there a chance that AutomationHub allows the version query without being authenticated? Are there alternative ways to create version badges? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Seems like you are right, if you visit https://console.redhat.com/api/automation-hub/v3/collections/ibm/ibm_zhmc/ without being logged in (ie in incognito mode) you get This should get resolved as part of the work to move galaxy.ansible.com to the GalaxyNG codebase (which powers Automation Hub). Though realistically that's 18+ months away. I don't know of any way to work around this. I've asked the Automation Hub development team. |
Beta Was this translation helpful? Give feedback.
-
Just for the record: As of today, it still returns missing authentication when not logged in: https://console.redhat.com/api/automation-hub/v3/collections/ibm/ibm_zhmc/ |
Beta Was this translation helpful? Give feedback.
Seems like you are right, if you visit https://console.redhat.com/api/automation-hub/v3/collections/ibm/ibm_zhmc/ without being logged in (ie in incognito mode) you get
Missing Authentication
.This should get resolved as part of the work to move galaxy.ansible.com to the GalaxyNG codebase (which powers Automation Hub). Though realistically that's 18+ months away.
I don't know of any way to work around this.
I've asked the Automation Hub development team.