No description
Find a file
Maël Gramain 7ad3a171c0
All checks were successful
ci/woodpecker/manual/pull_request Pipeline was successful
ci/woodpecker/tag/pull_request Pipeline was successful
from file
2025-01-06 22:04:50 +01:00
.woodpecker from file 2025-01-06 22:04:50 +01:00
img [ImgBot] Optimize images 2022-10-14 20:52:20 +00:00
Dockerfile feat(all_files): adding plugin 2022-10-14 20:57:13 +01:00
docs.md Fix author key 2024-01-14 12:51:18 +01:00
go.mod feat(all_files): adding plugin 2022-10-14 20:57:13 +01:00
LICENSE Initial commit 2022-10-14 20:10:49 +01:00
main.go from file 2025-01-06 22:04:50 +01:00
README.md Update README.md 2022-10-15 19:47:14 +01:00

gitea-pull-request-comment-plugin

A Woodpecker plugin to post comments onto a Gitea Pull Requests.

Note this currently only works on pull request events.

You'll need to generate a Gitea API token before you can use this.

Usage/Examples

This example uses a woodpecker secret to pass the gitea API token to the pipeline job. The secret is enabled for use on pull requests .

secrets

pipeline:
  comment:
    image: mcs94/gitea-comment
    settings:
      gitea_address: https://gitea.url.goes.here
      gitea_token:
        from_secret: gitea_token
      comment: >
        ✅ Build ${CI_BUILD_EVENT} of `${CI_REPO_NAME}` has status `${CI_BUILD_STATUS}`.

        📝 Commit by ${CI_COMMIT_AUTHOR} on `${CI_COMMIT_BRANCH}`:

        `${CI_COMMIT_MESSAGE}`

        🌐 ${CI_BUILD_LINK}
    when:
      event: [pull_request]

Produces something with looks like the screenshot below on pull requests:

comments

Authors

Running just the container

docker run \
-e PLUGIN_COMMENT="test comment" \
-e PLUGIN_GITEA_TOKEN="tokenhere" \
-e PLUGIN_GITEA_ADDRESS="https://gitea.url.here" \
-e CI_REPO_OWNER="repoowner" \
-e CI_REPO_NAME="yourrepo" \
-e CI_COMMIT_PULL_REQUEST=8 \
test-gitea