-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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(commit-context): Do not create if older than 1 year #54624
feat(commit-context): Do not create if older than 1 year #54624
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #54624 +/- ##
==========================================
+ Coverage 79.74% 79.78% +0.03%
==========================================
Files 4995 5000 +5
Lines 212230 212382 +152
Branches 36179 36191 +12
==========================================
+ Hits 169247 169440 +193
+ Misses 37775 37730 -45
- Partials 5208 5212 +4
|
# Only return suspect commits that are less than a year old | ||
if commit_context and datetime.strptime( | ||
commit_context["committedDate"], "%Y-%m-%dT%H:%M:%SZ" | ||
).replace(tzinfo=timezone.utc) > datetime.now(tz=timezone.utc) - timedelta(days=365): |
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.
This should probably be a constant or a setting somewhere
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
PR reverted: d5a3714 |
)" This reverts commit 14935b6. Co-authored-by: asottile-sentry <103459774+asottile-sentry@users.noreply.github.com>
## Objective Update on the reverted PR: #54624 The original PR had errors from GitLab date strings not being parsed correctly bc they are formatted differently from GitHub. So this PR returns the datetime object for internal usage and will make date comparisons easier without needing to know which integration it came from.
Objective:
Do not create a suspect commit if the resulting commit is over 1 year old.