Skip to content
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

[CI] add date validation before create new github issue to avoid dupl… #265

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

SamYuan1990
Copy link
Collaborator

add date validation with regex to avoid duplicate github issue

from openai import OpenAI
from github import Github

github_token = os.getenv("GITHUB_TOKEN")
repo_name = "sustainable-computing-io/kepler-metal-ci"

today = datetime.datetime.now().strftime('%Y-%m-%d')
lastIssueDate = "2024-07-31"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will the issue date remain constant? Wouldn't this change

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as a long term goal, I am not sure if we can ref https://github.com/sustainable-computing-io/kepler-metal-ci/pull/265/files#diff-0028b6356c8200f2409c83d6d3a1a35bd5025c9aed8872595981bf0db3d7abcaR8 to make it as an environment value?
for short term, just hard code to reduce duplicate issue open as #267

@rootfs rootfs merged commit 51171e0 into main Sep 26, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants