-
Notifications
You must be signed in to change notification settings - Fork 37
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(gitlab): handle pagination of GitLab webhooks (#684) #684
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #684 +/- ##
==========================================
+ Coverage 60.06% 60.13% +0.06%
==========================================
Files 32 32
Lines 3308 3316 +8
==========================================
+ Hits 1987 1994 +7
- Misses 1321 1322 +1
|
d6adb77
to
f11c539
Compare
reana_server/utils.py
Outdated
@@ -511,27 +524,22 @@ def _get_gitlab_hook_id(project_id, gitlab_token): | |||
""" | |||
gitlab_hooks_url = ( | |||
REANA_GITLAB_URL | |||
+ "/api/v4/projects/{0}/hooks?access_token={1}".format(project_id, gitlab_token) | |||
+ "/api/v4/projects/{0}/hooks?per_page=100&access_token={1}".format( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we could introduce a new configuration variable in config.py
with REANA_GITLAB_PER_PAGE = 100
so that the value wouldn't be hard-coded?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have introduced REANA_GITLAB_MAX_PER_PAGE
f11c539
to
3f716f7
Compare
Depends on #681
Closes #682