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

fix: allow gitlab eventsource to work without projects or groups #3508

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Priscillesg
Copy link

Summary

This PR modifies the Gitab EventSource validation logic to allow configurations without projects or groups. This change ensures that users can manage webhooks externally while still using Argo Events.

Changes

  • Removed the mandatory validation check for projects and groups in validate.go.
  • Updated the test cases in validate_test.go to reflect the new behavior.

Testing

  • Ran go test -v ./pkg/eventsources/sources/gitlab/ -run TestValidateEventSource successfully.
  • Verified that Argo EventSource no longer requires projects/groups.

@ryancurrah

@Priscillesg Priscillesg requested a review from whynowy as a code owner March 6, 2025 18:49
@Priscillesg Priscillesg changed the title Allow Gitlab EventSource to work without projects or groups fix: allow Gitlab EventSource to work without projects or groups Mar 6, 2025
@Priscillesg Priscillesg changed the title fix: allow Gitlab EventSource to work without projects or groups fix: allow gitlab eventsource to work without projects or groups Mar 6, 2025
@@ -858,7 +858,7 @@ type GitlabEventSource struct {
// Metadata holds the user defined metadata which will passed along the event payload.
// +optional
Metadata map[string]string `json:"metadata,omitempty" protobuf:"bytes,9,rep,name=metadata"`
// List of project IDs or project namespace paths like "whynowy/test". Projects and groups cannot be empty at the same time.
// List of project IDs or project namespace paths like "whynowy/test".
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add that not defining a group or project means the event source will not manage webhooks?

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