Skip to content

Show the latest release of plugins in the plugin index if exist - #7480

Merged
6543 merged 10 commits into
woodpecker-ci:mainfrom
6543-forks:plugin-add-version
Nov 8, 2026
Merged

6543 merged 10 commits into
woodpecker-ci:mainfrom
6543-forks:plugin-add-version

Conversation

@6543

@6543 6543 commented Nov 4, 2026

Copy link
Copy Markdown
Member
image image

@6543 6543 added plugin documentation docu & docs enhancement improve existing features labels Nov 4, 2026
@6543
6543 requested a review from a team November 4, 2026 12:21
@woodpecker-bot

woodpecker-bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Surge PR preview deployment was removed

@qwerty287

Copy link
Copy Markdown
Contributor

In your screenshot, why is there no badge for git and codecov? They should have a latest release. (Surge preview is not working so I can't check right now)

Besides that, I'm not really sure how that improves our index. Looking up the latest release is very simple and shouldn't take you much time.

@6543

6543 commented Nov 5, 2026 •

Copy link
Copy Markdown
Member Author

In your screenshot, why is there no badge for git and codecov?

in the preview it exists, it's just a screenshot from local test build that i did to oftern and github hat rate limited me ...

Surge preview is not working so I can't check right now)

that's interesting, it works for me ... how does it fail for you?

Besides that, I'm not really sure how that improves our index.

This is more of an UX decission for people to visualize we do care about updates,
I took that idea from the ALASCA conference from feedback, It does not hurt us at all and is nice to look at, that one could just create there own script or klick around in the web to get the same info is second i would say ...

@qwerty287

Copy link
Copy Markdown
Contributor

that's interesting, it works for me ... how does it fail for you?

Can't connect to the server at all. Not with my browser, but not even with ping... If it works for you, it's likely a network issue at my side though...

@6543

6543 commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

for such things you could just use the tor browser, it gets it's DNS and trafic from definetly outside your network or even ISP if that one is currently blocking stuff etc...

@qwerty287

Copy link
Copy Markdown
Contributor

Two questions:

  1. it looks quite off to have one "metadata" without a link between the two with link. We could just link to the release, right?
grafik
  1. I built this only two times locally, and the second time, I hit the github rate limit for most of the plugins hosted on github. This could happen very often on our infra as well, or is there something I missed to prevent that?

@6543

6543 commented Nov 7, 2026

Copy link
Copy Markdown
Member Author
  1. nice idea!

@6543

6543 commented Nov 7, 2026

Copy link
Copy Markdown
Member Author
  1. i'll look into add option to define opt. read tokens for api for gh and cb ...

and i perhaps can use graphql to speedup gh ...

@6543 6543 added the wip label Nov 7, 2026
@6543 6543 self-assigned this Nov 7, 2026
6543 and others added 6 commits November 7, 2026 06:38
The latest release was the only metadata item on the plugin page
without a link, next to the linked container image and website.
The release APIs of GitHub, Gitea and Forgejo return the web page of
the release as html_url, so keep it with the tag and link to it.
Anonymous requests to the GitHub API are limited to 60 per hour, so a
second local build of the plugin index already fails the release
lookups for most plugins hosted on GitHub, and the docs pipeline can hit
it the same way. Codeberg limits anonymous requests as well.

Read optional tokens from GITHUB_TOKEN and CODEBERG_TOKEN and send each
one only to the API host it belongs to. Other forges are a new entry in
the host table.

v2: drop the sentence about where the tokens are sent from the docs and
put one sentence per line there, which is easier to edit by hand.
A failed release lookup only logged the HTTP status, so a 403 from
GitHub did not tell if the token was wrong or blocked by a policy.
GitHub, Gitea and Forgejo return the reason as message in the error
body, so log it as well.
Give the plugin index build the GITHUB_TOKEN and CODEBERG_TOKEN it reads
for the release lookups, so the docs pipeline does not hit the rate
limits of anonymous API requests.

v2: drop the comment that only repeated what the step says.
@6543 6543 removed the wip label Nov 7, 2026
The docs files of plugins were still fetched anonymously, from
raw.githubusercontent.com and codeberg.org, so a build could still run
into the rate limits that the tokens should avoid. GitHub limits
anonymous downloads from raw.githubusercontent.com like anonymous API
requests.

Move the token table out of the release lookup and use it for the docs
files as well, with raw.githubusercontent.com as GitHub host.
@6543

6543 commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

@qwerty287 all addressed ... PS: grapql does not make sense here ...

@6543
6543 merged commit bf87266 into woodpecker-ci:main Nov 8, 2026
7 checks passed
@6543
6543 deleted the plugin-add-version branch November 8, 2026 10:58
@woodpecker-bot woodpecker-bot mentioned this pull request Nov 8, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation docu & docs enhancement improve existing features plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants