Compare commits
11 commits
30383e0c79
...
fcd7f83555
Author | SHA1 | Date | |
---|---|---|---|
![]() |
fcd7f83555 | ||
![]() |
4136fb1433 | ||
![]() |
8c8644ad78 | ||
![]() |
1691010958 | ||
![]() |
1918123c8d | ||
![]() |
9a3338a8e1 | ||
![]() |
1919eebb41 | ||
![]() |
32f18a512c | ||
![]() |
3469be6226 | ||
![]() |
3e96e0306d | ||
![]() |
99446ad500 |
4 changed files with 54 additions and 3 deletions
14
README.md
14
README.md
|
@ -1,11 +1,19 @@
|
||||||
# gitea-comment-plugin
|
# gitea-pull-request-comment-plugin
|
||||||
|
|
||||||
A Woodpecker plugin to post comments onto a Gitea Pull Request.
|
A Woodpecker plugin to post comments onto a Gitea Pull Requests.
|
||||||
|
|
||||||
Note this currently only works on `pull request` events.
|
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
|
## 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` .
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
pipeline:
|
pipeline:
|
||||||
comment:
|
comment:
|
||||||
|
@ -41,7 +49,7 @@ docker run \
|
||||||
-e PLUGIN_COMMENT="test comment" \
|
-e PLUGIN_COMMENT="test comment" \
|
||||||
-e PLUGIN_GITEA_TOKEN="tokenhere" \
|
-e PLUGIN_GITEA_TOKEN="tokenhere" \
|
||||||
-e PLUGIN_GITEA_ADDRESS="https://gitea.url.here" \
|
-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_REPO_NAME="yourrepo" \
|
||||||
-e CI_COMMIT_PULL_REQUEST=8 \
|
-e CI_COMMIT_PULL_REQUEST=8 \
|
||||||
test-gitea
|
test-gitea
|
||||||
|
|
43
docs.md
Normal file
43
docs.md
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
---
|
||||||
|
name: Gitea Comment
|
||||||
|
author: markopolo123
|
||||||
|
description: Plugin to add comments to a Gitea Pull Request
|
||||||
|
tags: [Gitea, comment]
|
||||||
|
containerImage: mcs94/gitea-comment
|
||||||
|
containerImageUrl: https://hub.docker.com/r/mcs94/gitea-comment
|
||||||
|
url: https://github.com/markopolo123/gitea-comment-plugin
|
||||||
|
---
|
||||||
|
|
||||||
|
A Woodpecker plugin to post comments onto a Gitea Pull Request.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Example pipeline:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
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]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Settings
|
||||||
|
|
||||||
|
|Name|Description|Default|
|
||||||
|
|---|---|---|
|
||||||
|
| `gitea_address` |URL for your gitea instance| none|
|
||||||
|
| `gitea_token` |Gitea API token| none|
|
||||||
|
| `comment` |comment to add to Pull Request|none|
|
BIN
img/comments.png
BIN
img/comments.png
Binary file not shown.
Before ![]() (image error) Size: 633 KiB After ![]() (image error) Size: 359 KiB ![]() ![]() |
BIN
img/secret.png
Normal file
BIN
img/secret.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 24 KiB |
Loading…
Add table
Reference in a new issue