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

Add TriggerTestProjectHook function to ProjectsService #1966

Merged
merged 2 commits into from
Jul 13, 2024

Conversation

bearx3f
Copy link
Contributor

@bearx3f bearx3f commented Jul 1, 2024

From GitLab 17.0+ they add "Trigger a test project hook" to test project's hook

Copy link
Member

@svanharmelen svanharmelen left a comment

Choose a reason for hiding this comment

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

Looks good, but needs a small update...

projects.go Outdated
Comment on lines 1433 to 1437
// In GitLab 17.0 and later, this endpoint has a special rate limit.
// In GitLab 17.0 the rate was three requests per minute for each project hook.
// In GitLab 17.1 this was changed to five requests per minute for each project and authenticated user.
// To disable this limit on self-managed GitLab and GitLab Dedicated,
// an administrator can disable the feature flag named web_hook_test_api_endpoint_rate_limit.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// In GitLab 17.0 and later, this endpoint has a special rate limit.
// In GitLab 17.0 the rate was three requests per minute for each project hook.
// In GitLab 17.1 this was changed to five requests per minute for each project and authenticated user.
// To disable this limit on self-managed GitLab and GitLab Dedicated,
// an administrator can disable the feature flag named web_hook_test_api_endpoint_rate_limit.
// In GitLab 17.0 and later, this endpoint has a special rate limit.
// In GitLab 17.0 the rate was three requests per minute for each project hook.
// In GitLab 17.1 this was changed to five requests per minute for each project
// and authenticated user.
//
// To disable this limit on self-managed GitLab and GitLab Dedicated, an
// administrator can disable the feature flag named web_hook_test_api_endpoint_rate_limit.

projects.go Outdated
ProjectHookEventReleases ProjectHookEvent = "releases_events"
ProjectHookEventEmoji ProjectHookEvent = "emoji_events"
ProjectHookEventResourceAccessToken ProjectHookEvent = "resource_access_token_events"
)
Copy link
Member

Choose a reason for hiding this comment

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

Can you move this to (the correct ordered location) in types.go? Thanks!

@bearx3f
Copy link
Contributor Author

bearx3f commented Jul 13, 2024

Hi, thanks for your comment, I changed as your suggestion.

Copy link
Member

@svanharmelen svanharmelen left a comment

Choose a reason for hiding this comment

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

Thanks @bearx3f 👍🏻

@svanharmelen svanharmelen merged commit 69412a4 into xanzy:main Jul 13, 2024
3 checks passed
@bearx3f
Copy link
Contributor Author

bearx3f commented Jul 16, 2024

Do you have any updates on its release schedule?

@svanharmelen
Copy link
Member

Released v0.107.0

@bearx3f
Copy link
Contributor Author

bearx3f commented Jul 16, 2024

Thank you very much. I truly appreciate it.

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