github / contributors

GitHub Action that given an organization or repository, produces information about the contributors over the specified time period.
https://github.blog/2023-10-23-how-to-gain-insight-into-your-project-contributors/
MIT License
91 stars 13 forks source link

fix: skip date validation when env variable not set #144

Closed ReubenJ closed 2 months ago

ReubenJ commented 2 months ago

Pull Request

Proposed Changes

Skip date validation when the respective environment variable is set. Currently, omitting the dates causes the action to fail, so it's impossible to output a report that does not include whether a user is a new contributor.

Readiness Checklist

Author/Contributor

Reviewer

zkoppert commented 2 months ago

This is great! Thanks for adding!

I believe we also need to modify contributors.py where it has:

if start_date and end_date:

To have an else statement otherwise contributors will never be properly filled.

Oops! Ok this just isn't true. Contributors is calculated before the conditional so never mind.

ReubenJ commented 2 months ago

Yeah—one more test case for contributors.py probably wouldn't have hurt, but it does work with the fix! Thanks for the quick response.