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

feat: Add RepositoryRuleset resource #131

Merged

Conversation

asafhm
Copy link
Contributor

@asafhm asafhm commented Dec 15, 2024

Adds the RepositoryRuleset resource

(Organization ruleset is a feature allowed only in Github Enterprise, so this can help all those not with an enterprise plan)

@asafhm asafhm force-pushed the add-repositoryruleset-resource branch from 76d9700 to 5795717 Compare December 15, 2024 19:07
@asafhm asafhm force-pushed the add-repositoryruleset-resource branch from 5795717 to 9a9835e Compare December 15, 2024 19:12
@asafhm
Copy link
Contributor Author

asafhm commented Dec 15, 2024

Not sure why CI is failing...

@AtzeDeVries
Copy link
Collaborator

@asafhm, you need to run make generate and then add the generated files to the commit.

@asafhm
Copy link
Contributor Author

asafhm commented Dec 17, 2024

@AtzeDeVries The command fails because there's no target named generate:

make: *** No rule to make target `generate'.  Stop.

@AtzeDeVries
Copy link
Collaborator

ah the build folder (which contain the targets) is a git submodule, so you need to fetch the submodules.

@asafhm
Copy link
Contributor Author

asafhm commented Dec 17, 2024

@AtzeDeVries Excuse my noobieness, but after doing so and rerunning make generate, it complained about a missing goimports command:

panic: cannot run goimports for apis folder: bash: goimports: command not found
	: exit status 127

goroutine 1 [running]:
github.com/crossplane/upjet/pkg/pipeline.Run(0x14000616180, {0x14000590480, 0x32})
	/Users/asafhaim/go/pkg/mod/github.com/crossplane/[email protected]/pkg/pipeline/run.go:201 +0xf38
main.main()
	/Users/asafhaim/repos/asafhm/provider-upjet-github/cmd/generator/main.go:33 +0x78
exit status 2
apis/generate.go:25: running "go": exit status 1
generate: open /Users/asafhaim/repos/asafhm/provider-upjet-github/apis/actions/v1alpha1/zz_generated.deepcopy.go: no such file or directory
16:05:20 [FAIL]
make[1]: *** [go.generate] Error 1
make: *** [generate] Error 2

I assume this binary isn't installed somehow during this process?

@AtzeDeVries
Copy link
Collaborator

goimports is a binary you need to install, it validates import statements in go.

@asafhm
Copy link
Contributor Author

asafhm commented Dec 17, 2024

Thanks :) Added the generated files successfully.

@AtzeDeVries
Copy link
Collaborator

@asafhm you still need to sign the DCO, or always use signed commits.

Signed-off-by: Asaf Haim <[email protected]>
@asafhm asafhm force-pushed the add-repositoryruleset-resource branch from ec04b2d to a305cfd Compare December 17, 2024 20:08
@asafhm
Copy link
Contributor Author

asafhm commented Dec 17, 2024

Roger that, sorry for the back and forth.
I assume all is good now.

@AtzeDeVries AtzeDeVries merged commit d9a528c into crossplane-contrib:main Dec 18, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants