docker/gordon — pull request #158 by jbbarth (2014-12-17 14:37:28+00:00)
Title: Fix bad handling of repository name

I recently tried to use gordon against a repo ending with "deployment" and it didn't work at all. All requests were ending with messages like `Error getting pull requests Not Found`. After debugging it through `fmt.Println` statements (sorry, golang newbie here) I found that the problems was that all requests were sent against the wrong repo name. Actually, in `GetRemoteUrl()`, the repository name was returned with the last character missing.

Technical explanation extracted from the commit:
> The strings.TrimRight() function actually removes characters contained
> in the second argument from the first one, resulting in removing needed
> characters from repositories which name ends with 'g', 'i', or 't' (a
> dot '.' is impossible by construction). The correction function that
> removes a subtring at the end of a string is strings.TrimSuffix().

Hope this helps! Thanks for this tool btw ;-)