Merge pull request from markopolo123/init

docs(README.md): adding docs
This commit is contained in:
Mark Sharpley 2022-10-14 21:12:21 +01:00 committed by GitHub
commit 32f18a512c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -4,8 +4,16 @@ A Woodpecker plugin to post comments onto a Gitea Pull Request.
Note this currently only works on `pull request` events.
You'll need to generate a [Gitea API token](https://docs.gitea.io/en-us/api-usage/) 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](img/secret.png)
```yaml
pipeline:
comment:
@ -41,7 +49,7 @@ docker run \
-e PLUGIN_COMMENT="test comment" \
-e PLUGIN_GITEA_TOKEN="tokenhere" \
-e PLUGIN_GITEA_ADDRESS="https://gitea.url.here" \
-e CI_REPO_OWNER="repoowwer" \
-e CI_REPO_OWNER="repoowner" \
-e CI_REPO_NAME="yourrepo" \
-e CI_COMMIT_PULL_REQUEST=8 \
test-gitea

BIN
img/secret.png Normal file

Binary file not shown.

After

(image error) Size: 39 KiB