Giter VIP home page Giter VIP logo

hubot-gh-issues's Introduction

hubot-gh-issues

Hubot interface for GitHub issues

See src/gh-issues.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-gh-issues --save npm install hubot-gh-token --save

Then add hubot-gh-issues and hubot-gh-token to your external-scripts.json:

[
  "hubot-gh-issues",
  "hubot-gh-token"
]

Dependencies

  • hubot-gh-token

Configuration

  • HUBOT_GH_ISSUES_DEFAULT_OWNER
  • HUBOT_GH_ISSUES_DEFAULT_REPO

Sample Interaction

user1>> hubot github open issue "everything is broken!" about "all of the things are broken, help!" in "somecompany/somerepo" with labels "things"
hubot>> Created issue #4 in somecompany/somerepo - https://github.com/somecompany/somerepo/issues/4

hubot-gh-issues's People

Contributors

benwtr avatar

Stargazers

Luke Tainton avatar Chris Black avatar Luke Farnell avatar Alexander Salas Bastidas avatar

Watchers

James Cloos avatar  avatar  avatar

hubot-gh-issues's Issues

output issue urls when they are mentioned in chat

totally untested, just wrote this here, probably won't work on the first try:

robot.hear /(?:gh|github) issue #(\d+)(?: in ([\w\d-_]+)(?:\/([\w\d-_]+))?)?/i, id:'gh-issues.mention', (msg) ->
  id = msg.match[1]
    repo = if msg.match[2]? and msg.match[3]?
    "#{msg.match[2]}/#{msg.match[3]}"
  else if msg.match[2]?
    "#{DEFAULT_OWNER}/#{msg.match[2]}"
  else
    "#{DEFAULT_OWNER}/#{DEFAULT_REPO}"
  robot.ghissues.showIssue msg, id, repo

So you should then be able to mention issues in a chat:

User> So I says to Mabel, I says check out gh issue #4832742 in hubot-scripts/hubot-gh-issues
Hubot> Issue #4832742 in hubot-scripts/hubot-gh-issues - foo - https://github.com/hubot-scripts/hubot-gh-issues/issue/4832742

Token works but getting 'Error from GitHub API: Bad credentials'

@benwtr thanks for the enterprise token help.
I'm getting the "bad credentials" error above, but have verified that my token is valid.

I start my hubot like: HUBOT_GITHUB_TOKEN_FERNET_SECRETS={my token fernet secret} HUBOT_GH_ISSUES_DEFAULT_OWNER={email address to my GitHub enterprise account (from where the oath token is generated)} HUBOT_GH_ISSUES_DEFAULT_REPO={organization name} ./bin/hubot

If I run hubot github token verify it returns: "Your GitHub token is valid on github.{my enterprise}.com."

But if I run hubot github show issue #247 I get the error Hubot> Shell: Error from GitHub API: Bad credentials. Have I done something wrong? or any thoughts on how I can start debugging this/looking?

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.