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

Tweak pre-commit autoupdate CI workflow #214

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

altheaden
Copy link
Collaborator

This PR makes a few tweaks to the new pre-commit CI workflow. This workflow now skips the push and PR-creating steps when no changes are present (i.e., when pre-commit is already up-to-date). Also, PRs created via this action will automatically be assigned reviewers and a ci label.

Checklist

  • Testing comment in the PR documents testing used to verify the changes

@altheaden altheaden added the ci Changes affect github actions CI label Dec 5, 2024
@altheaden
Copy link
Collaborator Author

Testing

I tested this pretty extensively on my own fork of mache. I had some issues understanding the syntax related to the GITHUB_ENV variables. I ended up testing two scenarios:

  1. There are no updates to pre-commit when the workflow runs. This causes the push and pr-create steps to be skipped as expected.
  2. There are updates to pre-commit when the workflow runs. This causes all steps to run, creates a PR, and adds labels and reviewers as expected.
    @xylar let me know if you can think of any other scenarios that might be useful to test.

@altheaden altheaden requested a review from xylar December 5, 2024 19:18
Copy link
Collaborator

@xylar xylar left a comment

Choose a reason for hiding this comment

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

@altheaden, oh, you are so clever! This looks great!

@xylar
Copy link
Collaborator

xylar commented Dec 5, 2024

Your testing sounds fine. I can't think of anything else to try out.

@xylar xylar merged commit 389d3dc into E3SM-Project:main Dec 5, 2024
6 checks passed
@xylar xylar deleted the tweak-pre-commit-action branch December 5, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Changes affect github actions CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants