act shouldn't complain when there's no remote repo
Act version
5a1e0d9, built with my PR
Feature description
act complains when there's no remote repo.
Sometimes, a dev just wants to test ideas locally before creating a remote repo. :)
https://github.com/nektos/act/blob/ccd28e7939cf3feed230944cfc3a0498b98bddab/pkg/model/github_context.go#L172
func (ghc *GithubContext) SetRepositoryAndOwner(ctx context.Context, githubInstance string, remoteName string, repoPath string) {
if ghc.Repository == "" {
repo, err := git.FindGithubRepo(ctx, repoPath, githubInstance, remoteName)
if err != nil {
common.Logger(ctx).Warningf("unable to get git repo (githubInstance: %v; remoteName: %v, repoPath: %v): %v", githubInstance, remoteName, repoPath, err)
return
}
ghc.Repository = repo
}
ghc.RepositoryOwner = strings.Split(ghc.Repository, "/")[0]
}
This used to work but was removed.
https://github.com/nektos/act/compare/9085c833bf2b68e90c022e70912b3c0c4499bdbc..ace4cd47c7f099864866b1f60e064fecde7f36ea#diff-c057d66dc9657d8428e290c69871596e2b567bb8fecad62a99cab54398131a84L679
The main issue is getGithubContext is called in multiple places, so the error repeats over and over.
This bypasses the remote warning introduced in #2169
Is there any update to this? My script still works but this warning bothers me because it is cluttering the stdout logs. In that PR 2169, the merging is blocked. @stephenwithav
None that I'm aware of. @ChristopherHX?
None from my side as well, except permissions.
Does not look differently for my account. @stephenwithav
I'm not that far away from hard forking to actions-oss, I cannot do anything without cplee / inactive maintainers. Hard forking also means a huge regression of installation methods / github stars / visibility.
two approval rule is required to let mergify do the merge, that I'm not permitted to perform myself.
My primary focus left act this year, some PR's changed to closed from my side and no new changes from this month.
I'll be an active contributor if you fork, @ChristopherHX. If nektos/act is no longer actively maintained, it may be needed.
I had considered rewriting it from the ground up, but faced the same hard fork concerns. Refactoring a fork may be a better option.
Just to add that it's not when no remote exist, but when no remote named "origin" exist. I had 2 remote named gitlab and github and encounter this issue