a8n: Consistent naming for "ref" and "ref name"
Created by: mrnugget
This implements what I promised in this comment https://github.com/sourcegraph/sourcegraph/pull/6903#issuecomment-559463178
- It introduces consistent naming (across the Automation codebase) for "ref" and "ref name": a "ref" is a full ref, i.e.
refs/heads/master
. A "ref name" is the abbreviated ref, i.e.master
. - It introduces two helper functions in the
git
package to help with converting from one to the other (as described in @tsenart's comment here https://github.com/sourcegraph/sourcegraph/pull/6903/files/3179658366ed5894f4829c52a2b6bf10f83cb805#r351750520)
(I also changed test names, which required the moving of test fixtures, which in turn makes the diff look noisy. Feel free to ignore those, since they haven't changed or been updated.)