ComplianceAsCode / auditree-framework

The Auditree framework tool to run compliance control checks as unit tests.
https://auditree.github.io/
Apache License 2.0
59 stars 23 forks source link

feat: Support github pulls API #113

Closed cobu2b closed 3 years ago

cobu2b commented 3 years ago

What

Create a helper function to retrieve github pulls API.

Why

The information github pull requests can be useful for configuration controls of many compliance.

How

The function calls github pulls API and then select only the pull requests that match the given date/time.

Test

Context

Provide a bulleted list of GitHub issues, or any other references (mailing list discussion, etc...) that reviewers can reference for additional information regarding scope of the pull request.

alfinkel commented 3 years ago

Also, if you're going to provide a since option to getting pull requests, which I think is the most appealing part of the method, then the more efficient/performant way to do it would be to handle the pagination manually in the method rather than using the _paginate_api method to do it for you.

cobu2b commented 3 years ago

@alfinkel I have updated the function based on your suggestions. Please kindly help review the changes when you're free. Thank you

alfinkel commented 3 years ago

Looks like you probably need to bump your version in __init__.py and resolve conflicts in CHANGES.md. Once that's done, I'm hoping that'll kick your build into running. Then we can probably merge this in.