GithubHelp home page GithubHelp logo

joshdk / hub-comment Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 450 KB

๐Ÿ“ Automated GitHub pull request comments from CI

License: MIT License

Go 100.00%
go golang circleci github github-api github-bot github-automation

hub-comment's Introduction

CircleCI License Github downloads GitHub release

Hub-Comment

๐Ÿ“ Automate GitHub pull request comments in CI

Installing

From source

You can install a development version of this tool by running:

$ go get -u github.com/joshdk/hub-comment

Precompiled binary

Alternatively, you can download a precompiled release binary by running:

$ wget -q https://github.com/joshdk/hub-comment/releases/download/0.1.0/hub-comment_linux_amd64
$ sudo install hub-comment_linux_amd64 /usr/bin/hub-comment

Usage

Environment Setup

Since hub-comment communicates with the GitHub API, you must first create and export an API token into the working environment.

$ export GITHUB_TOKEN='2b6c...f4bd'

Comment Template

You can write a comment template file, using the same syntax used for Go templates. For example, you could save the following as hello-template.txt:

๐Ÿค– Hello from CI!

Build #{{.Env.CIRCLE_BUILD_NUM}} was run successfully.

Running

$ hub-comment -template-file hello-template.txt
Posting new comment as Josh Komoroske (joshdk) on joshdk/hub-comment#123:

โ†’ ๐Ÿค– Hello from CI!
โ†’
โ†’ Build #123 was run successfully.

To view comment visit:
โ†’ https://github.com/joshdk/hub-comment/issues/123#issuecomment-421483151

License

This code is distributed under the MIT License, see LICENSE.txt for more information.

hub-comment's People

Contributors

joshdk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

hub-comment's Issues

Add a comment delete option

If you want to have a pair of status messages (test failed, and eventually the same test passes) maybe the last one should delete the comment (only post a comment if you have something interesting to say).

Automated file uploading and attaching

It would be nice to be able to upload and attach build artifacts to comments (logs, tarballs, screenshots, etc).

While it's possible to upload files using a browser, there currently isn't a way to do this via the official API...

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.