-
Notifications
You must be signed in to change notification settings - Fork 17
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
TypeError: fromisoformat: argument must be str #92
Comments
@stevexiong-hennepin thank you for filing this. I can take a look shortly unless you want to take a try at a PR? (Zero pressure 😄) |
UPDATEDecided to ensure the OLDFix is to add check for if created_after_date and is_repo_created_date_before(repo.created_at, created_after_date):
continue I'm afk currently but will get a PR up with a test for it and I'll do a release after it merges. |
Fixes #92 This will handle ensure the value is never None. If the string does not match %Y-%m-%d format it will throw a ValueError as expected. - [x] add tests to specifically cover case with string is 2020-01-01 Signed-off-by: jmeridth <[email protected]>
Fixes #92 This will handle ensure the value is never None. If the string does not match %Y-%m-%d format it will throw a ValueError as expected. - [x] add tests to specifically cover case with string is 2020-01-01 Signed-off-by: jmeridth <[email protected]>
@stevexiong-hennepin I was unable to recreate the issue with the |
Fixes #92 This will handle ensure the value is never None. If the string does not match %Y-%m-%d format it will throw a ValueError as expected. - [x] add tests to specifically cover case with string is 2020-01-01 Signed-off-by: jmeridth <[email protected]>
…ison Fixes #92 Stop validating created_after_date as just a 10 character string and regex validate it as YYYY-DD-MM (where each is a digit in the string) - [x] add tests to specifically cover case with string is 2020-01-01 Signed-off-by: jmeridth <[email protected]>
I'm experiencing the same issue, tested with both 1.9.2 and 1.10.2:
Code: jobs:
evergreen:
name: evergreen
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Run evergreen action
uses: github/[email protected]
env:
CREATED_AFTER_DATE: "1970-01-01" # Tested with this value and not setting it at all
GH_TOKEN: ${{ secrets.GH_TOKEN }}
DRY_RUN: false
REPOSITORY: <org>/<repo> |
Testing some more, it seems like this error only appear when you specify Edit: I'm now fairly certain this error only happens when you specify |
Describe the bug
I'm testing this out for use. I'm getting the below error running on ubuntu-latest GitHub runner.
Traceback (most recent call last):
File "/action/workspace/evergreen.py", line 361, in
main() # pragma: no cover
^^^^^^
File "/action/workspace/evergreen.py", line 83, in main
if is_repo_created_date_before(repo.created_at, created_after_date):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/action/workspace/evergreen.py", line 164, in is_repo_created_date_before
repo_created_at_date = datetime.fromisoformat(repo_created_at).replace(tzinfo=None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: fromisoformat: argument must be str
To Reproduce
Expected behavior
As state in readme, it open issue/PR in the specified repo.
Screenshots
No response
Additional context
I did adding env CREATED_AFTER_DATE and hardcoded "2020-01-01" as value. I got the same error.
I did see the closed issue #82, and the error appears to committed code from the pr #83 that closed that issue.
The text was updated successfully, but these errors were encountered: