drone-github-comment/content/_index.md
Robert Kaussow f35141957e commit 5ce87cc2ed
Author: Robert Kaussow <mail@thegeeklab.de>
Date:   Sun May 29 22:06:59 2022 +0200

    docs: refactor plugin properties
2022-05-29 20:09:24 +00:00

2.2 KiB

title
drone-github-comment

Build Status Docker Hub Quay.io GitHub contributors Source: GitHub License: MIT

Drone plugin to add comments to GitHub Issues and Pull Requests.

{{< toc >}}

Usage

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

{{< propertylist name=drone-s3-sync.data >}}

Build

Build the binary with the following command:

export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0
export GO111MODULE=on

make build

Build the Docker image with the following command:

docker build --file docker/Dockerfile.amd64 --tag thegeeklab/drone-github-comment .

Test

docker run --rm \
  -e DRONE_BUILD_EVENT=pull_request \
  -e DRONE_REPO_OWNER=octocat \
  -e DRONE_REPO_NAME=foo \
  -e DRONE_PULL_REQUEST=1
  -e PLUGIN_API_KEY=abc123 \
  -e PLUGIN_MESSAGE="Demo comment" \
  -v $(pwd):$(pwd) \
  -w $(pwd) \
  thegeeklab/drone-github-comment