feat: add option to specify git remote name (#1104)

fixes https://github.com/nektos/act/issues/1099
fixes https://github.com/nektos/act/issues/983

Signed-off-by: Ryan <[email protected]>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Ryanandmergify[bot] authored and GitHub committed 2022-04-04 17:53:08 +00:00
1 parent 9dc17f9144
commit d4272bd9fe
6 files changed
+15 -7

No files matched your search

+2 -2
View File
@@ -47,7 +47,7 @@ func TestFindGitSlug(t *testing.T) {
func testDir(t *testing.T) string {
basedir, err := ioutil.TempDir("", "act-test")
require.NoError(t, err)
t.Cleanup(func() { os.RemoveAll(basedir) })
t.Cleanup(func() { _ = os.RemoveAll(basedir) })
return basedir
}
@@ -86,7 +86,7 @@ func TestFindGitRemoteURL(t *testing.T) {
err = gitCmd("config", "-f", fmt.Sprintf("%s/.git/config", basedir), "--add", "remote.origin.url", remoteURL)
assert.NoError(err)
u, err := findGitRemoteURL(basedir)
u, err := findGitRemoteURL(basedir, "origin")
assert.NoError(err)
assert.Equal(remoteURL, u)
}