mirror of
https://github.com/thegeeklab/drone-github-comment.git
synced 2024-11-25 12:10:39 +00:00
commit 5ce87cc2ed
Author: Robert Kaussow <mail@thegeeklab.de> Date: Sun May 29 22:06:59 2022 +0200 docs: refactor plugin properties
This commit is contained in:
parent
f69347cc49
commit
f35141957e
@ -17,6 +17,29 @@ Drone plugin to add comments to GitHub Issues and Pull Requests.
|
|||||||
<!-- spellchecker-enable -->
|
<!-- spellchecker-enable -->
|
||||||
<!-- prettier-ignore-end -->
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```YAML
|
||||||
|
kind: pipeline
|
||||||
|
name: default
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: pr-comment
|
||||||
|
image: thegeeklab/drone-github-comment
|
||||||
|
settings:
|
||||||
|
api_key: ghp_3LbMg9Kncpdkhjp3bh3dMnKNXLjVMTsXk4sM
|
||||||
|
message: "CI run completed successfully"
|
||||||
|
update: true
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
<!-- prettier-ignore-start -->
|
||||||
|
<!-- spellchecker-disable -->
|
||||||
|
{{< propertylist name=drone-s3-sync.data >}}
|
||||||
|
<!-- spellchecker-enable -->
|
||||||
|
<!-- prettier-ignore-end -->
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
Build the binary with the following command:
|
Build the binary with the following command:
|
||||||
@ -36,7 +59,7 @@ Build the Docker image with the following command:
|
|||||||
docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-github-comment .
|
docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-github-comment .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Test
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
docker run --rm \
|
docker run --rm \
|
||||||
@ -50,23 +73,3 @@ docker run --rm \
|
|||||||
-w $(pwd) \
|
-w $(pwd) \
|
||||||
thegeeklab/drone-github-comment
|
thegeeklab/drone-github-comment
|
||||||
```
|
```
|
||||||
|
|
||||||
### Parameters
|
|
||||||
|
|
||||||
api_key
|
|
||||||
: sets api key to access github api
|
|
||||||
|
|
||||||
base_url
|
|
||||||
: sets api url; need to be changed for gh enterprise (default `https://api.github.com`)
|
|
||||||
|
|
||||||
key
|
|
||||||
: sets unique key to assign to comment
|
|
||||||
|
|
||||||
message
|
|
||||||
: sets file or string with comment message
|
|
||||||
|
|
||||||
update
|
|
||||||
: enables update of an existing comment that matches the key
|
|
||||||
|
|
||||||
skip_missing
|
|
||||||
: skips comment creation if the given message file does not exist (default `false`)
|
|
34
data/data.yaml
Normal file
34
data/data.yaml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
properties:
|
||||||
|
api_key:
|
||||||
|
description: Personal Access token to access the GitHub API.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
|
||||||
|
base_url:
|
||||||
|
description: API URL. Only need to be changed for GitHub enterprise in most cases
|
||||||
|
defaultValue: https://api.github.com
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
|
||||||
|
key:
|
||||||
|
description: Unique identifier to assign to a comment. The identifier is used to update an existing comment.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
|
||||||
|
message:
|
||||||
|
description: File or string that contains the comment text.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
|
||||||
|
update:
|
||||||
|
description: Enables update of an existing comment that matches the key.
|
||||||
|
defaultValue: false
|
||||||
|
type: bool
|
||||||
|
required: false
|
||||||
|
|
||||||
|
skip_missing:
|
||||||
|
description: Skips comment creation if the given message file does not exist
|
||||||
|
defaultValue: false
|
||||||
|
type: bool
|
||||||
|
required: false
|
Loading…
Reference in New Issue
Block a user