git-blame
git-blame copied to clipboard
Beanstalk Support
Beanstalk support would be awesome! I'd submit a PR myself but I don't fully understand how the remotes are parsed.
Git Repository URL(s):
SSH: git@{project}.git.beanstalkapp.com:/{project}/{repo}.git
HTTPS: https://{project}.git.beanstalkapp.com/{repo}.git
Changeset URL:
https://{project}.beanstalkapp.com/{repo}/changesets/{commit}
I'd like to support as much as possible out of the box.
Url parsing code needs to be smarter since I make some assumptions right now about the remote url structure in this function where I pull out the project and repo name from the remote repository.
This guy needs to take in either or your repository urls listed above and return an object like:
{
project: "projectName",
repo: "repoName"
}
Let me know if you'd like to help out...otherwise I can take a look at this in a few days.
The hardcoding solution shouldnt be too bad but...I'm thinking the right way to do this is to be able to generate proper regular expressions from template strings like the ones you've given like git@{project}.git.beanstalkapp.com:/{project}/{repo}.git
would be converted into a regex dynamically instead of having to be hardcoded.
This will allow lots more defaults to be added down the line. I'll think about how we can achieve this.
I was also unable to get beanstalk changeset URLs to work.
I used this as the Template String:
https://<%- project %>.beanstalkapp.com/<%- repo %>/changesets/<%- revision %>