mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
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 <me@hackerc.at> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
baaf0c58b2
commit
19cddfbddd
6 changed files with 15 additions and 7 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue