Compare commits

...

11 commits

Author SHA1 Message Date
Mark Sharpley
fcd7f83555
Merge pull request from qwerty287/patch-1
Fix author key
2024-01-14 16:36:56 +00:00
qwerty287
4136fb1433
Fix author key 2024-01-14 12:51:18 +01:00
Mark Sharpley
8c8644ad78
Merge pull request from markopolo123/imgbot
[ImgBot] Optimize images
2022-10-15 19:56:49 +01:00
Mark Sharpley
1691010958
Update README.md 2022-10-15 19:47:14 +01:00
ImgBotApp
1918123c8d
[ImgBot] Optimize images
*Total -- 671.84kb -> 382.79kb (43.02%)

/img/comments.png -- 633.05kb -> 359.00kb (43.29%)
/img/secret.png -- 38.78kb -> 23.79kb (38.66%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2022-10-14 20:52:20 +00:00
Mark Sharpley
9a3338a8e1
Merge pull request from markopolo123/docs.md
fix(docs.md): required for woodpecker plugin acceptance
2022-10-14 21:35:17 +01:00
Mark Sharpley
1919eebb41
fix(docs.md): required for woodpecker plugin acceptance
Signed-off-by: Mark Sharpley <698889+markopolo123@users.noreply.github.com>
2022-10-14 21:34:51 +01:00
Mark Sharpley
32f18a512c
Merge pull request from markopolo123/init
docs(README.md): adding docs
2022-10-14 21:12:21 +01:00
Mark Sharpley
3469be6226
docs(README.md): adding secret example
Signed-off-by: Mark Sharpley <698889+markopolo123@users.noreply.github.com>
2022-10-14 21:11:56 +01:00
Mark Sharpley
3e96e0306d
docs(README.md): adding docs
Signed-off-by: Mark Sharpley <698889+markopolo123@users.noreply.github.com>
2022-10-14 21:06:39 +01:00
Mark Sharpley
99446ad500
Merge pull request from markopolo123/init
feat(all_files): adding plugin
2022-10-14 21:03:34 +01:00
4 changed files with 54 additions and 3 deletions

View file

@ -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.
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

43
docs.md Normal file
View 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|

Binary file not shown.

Before

(image error) Size: 633 KiB

After

(image error) Size: 359 KiB

BIN
img/secret.png Normal file

Binary file not shown.

After

(image error) Size: 24 KiB