Giter Site home page Giter Site logo

drone-github-comment's Introduction

drone-github-comment

Drone plugin to add comments to a Github Issues/PRs.

Build

Build the binary with the following commands:

go build
go test

Docker

Build the docker image with the following commands:

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -tags netgo
docker build --rm=true -t jmccann/drone-github-comment .

Please note incorrectly building the image for the correct x64 linux and with GCO disabled will result in an error when running the Docker image:

docker: Error response from daemon: Container command
'/bin/drone-github-comment' not found or does not exist.

Usage

Execute from the working directory:

docker run --rm \
  jmccann/drone-github-comment:1 --repo-owner jmccann --repo-name drone-github-comment \
  --pull-request 12 --api-key abcd1234 --message "Hello World!"

drone-github-comment's People

Contributors

brkalow avatar jmccann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

drone-github-comment's Issues

.drone.yml example

Awesome plugin. Could you show a sample of .drone.yml usage in the README? Not clear to me if the api key needs to be specified there since Drone already has access to GitHub out of necessity.

Ability to run custom commands with the default drone credentials

The following pipeline block works:

droneGithubComment:
    image: jmccann/drone-github-comment:1.2
    message_file: hello.file

I am guessing it's using the default drone credentials.

Now if I modify the pipeline block to run custom commands, I get an error:

droneGithubComment:
    image: jmccann/drone-github-comment:1.2
    entrypoint: ''
    commands:
      - /bin/drone-github-comment --message-file=hello.file
+ /bin/drone-github-comment --message-file=hello.file
time="2018-11-23T09:23:29Z" level=info msg="Drone Github Comment Plugin Version" Revision= 
time="2018-11-23T09:23:29Z" level=fatal msg="You must provide an API key or Username and Password" 

After supplying the github_token secret , I am now getting

+ /bin/drone-github-comment --message-file=hello.file
time="2018-11-23T13:22:20Z" level=info msg="Drone Github Comment Plugin Version" Revision= 
time="2018-11-23T13:22:20Z" level=fatal msg="POST https://api.github.com/repos/salimane/my-repo/issues/109/comments: 404 Not Found []" 

@jmccann do you have an idea what's happening here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.