-
Notifications
You must be signed in to change notification settings - Fork 28
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 webhook_secret column to repos #28
Conversation
Codecov Report
@@ Coverage Diff @@
## main #28 +/- ##
=======================================
- Coverage 95.26 95.20 -0.06
=======================================
Files 569 570 +1
Lines 14291 14317 +26
=======================================
+ Hits 13613 13630 +17
- Misses 678 687 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -20,7 +21,7 @@ def add_arguments(self, parser: CommandParser) -> None: | |||
|
|||
def handle(self, *args, **options): | |||
repos = Repository.objects.filter( | |||
Q(author__service="gitlab") & ~Q(hookid=None), | |||
Q(author__service="gitlab") & ~Q(hookid=None) & Q(webhook_secret=None), |
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.
Do we still need/want to rely on hookid
? Are we deprecating that eventually?
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.
No, we'll continue using that field. It stores the external ID of the webhook installed in the Git provider's repo. We need that ID to make any updates to the webhook.
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.
Looks good here
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
- Coverage 95.25% 95.20% -0.06%
==========================================
Files 569 570 +1
Lines 14291 14317 +26
==========================================
+ Hits 13613 13630 +17
- Misses 678 687 +9
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Instead of a globally configured webhook secret for GitLab we'll store a unique secret per repo. This PR adds a new
repos.webhook_secret
column to store that secret.