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

Add two new workflows to warn PR authors about the intel/llvm migration #2685

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

martygrant
Copy link
Contributor

@martygrant martygrant commented Feb 10, 2025

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

    • comments on new PRs (also reopened, edited, marked ready for review or synchronized) explaining the move to intel/llvm
    • label the PR with the new auto-close label
    • will only run when auto-close is not present
  • pr-migration-auto-close.yml

    • runs once daily and checks for any auto-close labelled PRs older than 30 days, and closes them with an additional comment about the intel/llvm migration

Should 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.

@github-actions github-actions bot added the ci/cd Continuous integration/devliery label Feb 10, 2025
@martygrant martygrant changed the title Add two new workflows to warn PR authors about the intel/llvm Add two new workflows to warn PR authors about the intel/llvm migration Feb 10, 2025
@martygrant martygrant force-pushed the martin/auto-close-prs branch from 010d3ab to aabf1c8 Compare February 10, 2025 17:47
Copy link
Contributor

@kbenzie kbenzie left a 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?

@martygrant
Copy link
Contributor Author

@kbenzie I wrote them in a test repo if that's what you mean? martygrant/tmp#2

@martygrant
Copy link
Contributor Author

@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?

@kbenzie
Copy link
Contributor

kbenzie commented Feb 17, 2025

@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.

@kbenzie
Copy link
Contributor

kbenzie commented Feb 17, 2025

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.

@martygrant
Copy link
Contributor Author

Okay, for some reason I was under the impression there were some off the shelf actions for this.

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.

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.

I forgot the script wasn't immediately closing them, totally fine then.

The pr-migration-warn.yml file just needs an update with what should go in the automated comment.

@martygrant martygrant force-pushed the martin/auto-close-prs branch 3 times, most recently from 3cdc1b0 to d4af8ea Compare February 20, 2025 11:49
@martygrant
Copy link
Contributor Author

Unified Runtime -> intel/llvm Repo Move Notice

Information

The source code of Unified Runtime has been moved to intel/llvm under the unified-runtime top-level directory,
all future development will now be carried out there. This was done in intel/llvm#17043.

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 Migration

All open PRs including this one will be labelled auto-close and shall be automatically closed after 30 days.
To allow for some breathing space, this automation will not be enabled until next week (27/02/2025).

Should you wish to continue with your PR you will need to migrate it to intel/llvm.
We have provided a script to help automate this process.


This is an automated comment.

@martygrant martygrant force-pushed the martin/auto-close-prs branch from d4af8ea to 6450f50 Compare February 26, 2025 15:42
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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor Author

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.
@martygrant martygrant force-pushed the martin/auto-close-prs branch from 6450f50 to 5ffb9df Compare February 26, 2025 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/cd Continuous integration/devliery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants