Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

act shouldn't complain when there's no remote repo #2493

Open
stephenwithav opened this issue Oct 19, 2024 · 3 comments · May be fixed by #2495
Open

act shouldn't complain when there's no remote repo #2493

stephenwithav opened this issue Oct 19, 2024 · 3 comments · May be fixed by #2495
Labels
kind/feature-request New feature or request

Comments

@stephenwithav
Copy link

stephenwithav commented Oct 19, 2024

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. :)

common.Logger(ctx).Warningf("unable to get git repo (githubInstance: %v; remoteName: %v, repoPath: %v): %v", githubInstance, remoteName, repoPath, err)

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]
}
@stephenwithav stephenwithav added the kind/feature-request New feature or request label Oct 19, 2024
@stephenwithav
Copy link
Author

The main issue is getGithubContext is called in multiple places, so the error repeats over and over.

@stephenwithav
Copy link
Author

This bypasses the remote warning introduced in #2169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature-request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant