Last active
April 16, 2019 06:22
-
-
Save lucaswilric/a4253a7b667ae531524a to your computer and use it in GitHub Desktop.
Open Buildkite for the current repo and branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Open Buildkite builds for the current repo and branch | |
# Tested on OSX 10.10.5 | |
repo = `git info | grep remote.origin.url | sed -nE 's/.*github\.com[\:\/](.*)\.git/\\1/p'`.chomp | |
buildkite_slug = repo.gsub('_', '-') | |
branch = ARGV.length > 0 ? ARGV[0] : `git rev-parse --abbrev-ref HEAD`.chomp | |
`open https://buildkite.com/#{buildkite_slug}/builds?branch=#{branch}` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's really cool. Here's another in shell.