No description
  • Go 63%
  • Nix 37%
Find a file
2026-09-11 14:33:42 +02:00
pr-comment feat: pr-comment plugin 2026-09-11 14:33:42 +02:00
.gitignore feat: pr-comment plugin 2026-09-11 14:33:42 +02:00
flake.lock feat: pr-comment plugin 2026-09-11 14:33:42 +02:00
flake.nix feat: pr-comment plugin 2026-09-11 14:33:42 +02:00
go.mod feat: pr-comment plugin 2026-09-11 14:33:42 +02:00
README.md feat: pr-comment plugin 2026-09-11 14:33:42 +02:00

Woodpecker plugins

Plugins for git.fosdem.org. One Go module, one package and one image per plugin. nix develop gives go and skopeo.

pr-comment

Comments on a pull request, once per marker. A rerun finds its own marker and skips, so a push to the branch does not repeat the comment.

Setting Value
token Forgejo token, scope write:issue
marker Identifier, hidden in an HTML comment
comment Body

CI_FORGE_URL, CI_REPO and CI_COMMIT_PULL_REQUEST come from Woodpecker.

  - name: comment-preview
    image: git.fosdem.org/fosdem/woodpecker-plugins/pr-comment
    settings:
      token:
        from_secret: forgejo_token
      marker: preview-link
      comment: "Staging preview: https://staging.fosdem.org/pr-${CI_COMMIT_PULL_REQUEST}/"
    when:
      - event: pull_request

Publish

Images are cross-compiled to linux/amd64, so any machine can publish. The token needs write:package.

export FORGEJO_USER=... FORGEJO_TOKEN=...
nix run .#publish-pr-comment

Pushes :<version> and :latest, then prints the digest to pin in the pipeline. Versions live in flake.nix.