Skip to content

Conversation

@andrewkroh
Copy link
Member

@andrewkroh andrewkroh commented Feb 23, 2022

What does this PR do?

Construct dates as YYYY-MM-DDTHH:MM:SS+00:00 per
https://docs.github.com/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates.

Fixes #2731

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
@andrewkroh andrewkroh added bug Something isn't working, use only for issues Team:Security-External Integrations Integration:github GitHub labels Feb 23, 2022
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@andrewkroh andrewkroh requested a review from a team February 23, 2022 00:04
@elasticmachine
Copy link

elasticmachine commented Feb 23, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-02-23T02:07:12.456+0000

  • Duration: 20 min 11 sec

Test stats 🧪

Test Results
Failed 0
Passed 19
Skipped 0
Total 19

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.
per_page: "100"
order: asc
phrase: "{phrase:created:>=\\d{8}T(?:\\d{2})(?::\\d{2}){2}\\+0000}"
phrase: "{phrase:created:>=\\d{2}-\\d{2}-\\d{2}T(?:\\d{2})(?::\\d{2}){2}\\+00:00}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth also handling YYYY-MM-DDTHH:MM:SSZ dates as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

I had a bug with matching the four digit year.

No, not in this case. If we were trying to provide a more general mock implementation of Github's API then yes, definitely. This is an assertion on what we expect our request to look like from the httpjson client. So this gorilla/mux expression should match very closely to the data in that request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working, use only for issues Integration:github GitHub

3 participants