Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.

Conversation

@wking
Copy link
Contributor

@wking wking commented May 24, 2014

Details and motivation in the commit messages.

wking added 2 commits May 23, 2014 21:42
Short URLs are nice, but when I don't have a browser running, I prefer
something with the unadulterated commit hash.  With the new
envorinment variable, you can turn Git.io shortening on or off as you
see fit.

The alternative URL manipulation and HUBOT_GITHUB_API docs come from
github-commit-link.coffee.
Following 660ae28 (github-commit-link: Only show the first line of the
commit, 2014-03-13), but configurable this time, for folks who push
tiny feature branches and *do* actually want the whole message dumped
into their channel.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done asynchronously, so if you set process.env.HUBOT_GITIO, this updated commit.url isn't ensured to be set by the time robot.send is called.

To get around that, I'd suggest refactoring most of the logic to it's own function, so it can either be called in a callback for gitio if process.env.HUBOT_GITIO or by itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Sat, May 24, 2014 at 07:51:09AM -0700, Josh Nichols wrote:

To get around that, I'd suggest refactoring most of the logic to
it's own function, …

I've pulled this out into githubot with iangreenleaf/githubot#25.
Once that lands and is released, I'll update this PR with the
associated githubot bumps and API changes.

@technicalpickles
Copy link
Contributor

We are actually moving away from adding scripts to repository in favor of separate npm packages per scripts. We have already stopped accepting new scripts, and will stop accepting pull requests on this repository after hubot 3.0.

See #1113 for details. If you are interested in maintaining this longer term, check npm in case someone already made a package for it, and if not, check out https://hubot.github.com/docs/scripting/ for creating a package of your own.

cc @Nesquick @spajus @adomokos @hashashin @christhomson @wking @canadianveggie as previous contributors to this script.

Also, a quick npm search shows a number of scripts that might fill a similar role: https://www.npmjs.com/search?q=hubot+github

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants