-
Notifications
You must be signed in to change notification settings - Fork 123
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
Add two new workflows to warn PR authors about the intel/llvm migration #2685
base: main
Are you sure you want to change the base?
Conversation
010d3ab
to
aabf1c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these script blocks originating from somewhere else?
@kbenzie I wrote them in a test repo if that's what you mean? martygrant/tmp#2 |
@kbenzie I think a modification might be needed so some PRs are guarded from this so e.g. we don't have PRs to change any CI here automatically closed in the future, I guess either simply disable the workflow temporarily or change the script to filter out non code/spec directories? |
Okay, for some reason I was under the impression there were some off the shelf actions for this. |
We can fine tune things as needed. I'd hope any changes we make to CI don't last longer than the auto-closure period. |
There are (https://github.com/marketplace/actions/close-pull-request) but I think you don't get much functionality other than leaving a comment, since we want to label the PR too so we can auto close it later.
I forgot the script wasn't immediately closing them, totally fine then. The |
3cdc1b0
to
d4af8ea
Compare
Unified Runtime -> intel/llvm Repo Move NoticeInformationThe source code of Unified Runtime has been moved to intel/llvm under the unified-runtime top-level directory, The code will be mirrored to oneapi-src/unified-runtime and the specification will continue to be hosted at oneapi-src.github.io/unified-runtime. The contribution guide has been updated with new instructions for contributing to Unified Runtime. PR MigrationAll open PRs including this one will be labelled auto-close and shall be automatically closed after 30 days. Should you wish to continue with your PR you will need to migrate it to intel/llvm. This is an automated comment. |
d4af8ea
to
6450f50
Compare
const labelEvent = events.find(e => e.event === "labeled" && e.label.name === label); | ||
// If label added event found and is older than 30 days, close the PR | ||
if (labelEvent && new Date(labelEvent.created_at).toISOString() < thirtyDaysAgo) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a date comparison or a string comparison?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yep you're right. Fortunately it was working I guess because of the ISO format but might be better to compare them as actual dates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated comparing the dates now
…on, label PRs and automatically close them after 30 days.
6450f50
to
5ffb9df
Compare
Add two new workflows to warn PR authors about the intel/llvm migration, label PRs and automatically close them after 30 days.
pr-migration-warn.yml
auto-close
labelauto-close
is not presentpr-migration-auto-close.yml
auto-close
labelled PRs older than 30 days, and closes them with an additional comment about the intel/llvm migrationShould there be a reason to keep a PR open, simply manually remove the
auto-close
label. The first workflow does not run when PR labels are modified, so it would not run and re-label the PR again.