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(webhooks): prevent unnecessary organisation webhook tasks #3365

Merged

Conversation

matthewelwell
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Prevents tasks being created to call organisation webhooks unnecessarily. Previously this check was done inside the task (and still is for belt and braces) but it seems unnecessary to create the task if we know it won't execute.

How did you test this code?

Added unit tests.

@matthewelwell matthewelwell requested review from a team and zachaysan and removed request for a team February 1, 2024 14:19
Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 0:32am
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 0:32am
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 0:32am

Copy link
Contributor

github-actions bot commented Feb 1, 2024

Uffizzi Preview deployment-45600 was deleted.

Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

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

Overall looks good, but we really should add that one test.

api/audit/signals.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (789898c) 95.93% compared to head (2e75d55) 95.93%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3365      +/-   ##
==========================================
- Coverage   95.93%   95.93%   -0.01%     
==========================================
  Files        1071     1072       +1     
  Lines       32767    32807      +40     
==========================================
+ Hits        31434    31472      +38     
- Misses       1333     1335       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@zachaysan zachaysan left a comment

Choose a reason for hiding this comment

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

Looks great!

@matthewelwell matthewelwell added this pull request to the merge queue Feb 2, 2024
Merged via the queue into main with commit ec32ce7 Feb 2, 2024
21 checks passed
@matthewelwell matthewelwell deleted the fix/prevent-unnecessary-organisation-webhook-task branch February 2, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants