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 pre-commit autoupdate workflow #212

Merged
merged 27 commits into from
Sep 9, 2024
Merged

Add pre-commit autoupdate workflow #212

merged 27 commits into from
Sep 9, 2024

Conversation

mikealfare
Copy link
Contributor

@mikealfare mikealfare commented Sep 6, 2024

Problem

We moved all linting and formatting dependencies into .pre-commit-config.yml. While this consolidates these tools and isolates the dev environment from these dependencies, it also hides them from dependabot.

Solution

Add a reusable workflow:

  • run pre-commit autoupdate
  • run pre-commit run --all-files
  • submit a PR if updates were found

CI will take care of the verification of whether new conflicts were found in the updated pre-commit hooks.

A working implementation: dbt-labs/dbt-adapters#296
The resulting PR: dbt-labs/dbt-adapters#297

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue

@mikealfare mikealfare self-assigned this Sep 6, 2024
@mikealfare mikealfare marked this pull request as ready for review September 6, 2024 23:39
.github/workflows/pre-commit-autoupdate.yml Outdated Show resolved Hide resolved
.github/workflows/pre-commit-autoupdate.yml Show resolved Hide resolved
.github/workflows/pre-commit-autoupdate.yml Outdated Show resolved Hide resolved
.github/workflows/pre-commit-autoupdate.yml Outdated Show resolved Hide resolved
.github/workflows/pre-commit-autoupdate.yml Show resolved Hide resolved
@emmyoop emmyoop self-requested a review September 9, 2024 16:04
Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

One more change regarding the slack notification.

.github/workflows/pre-commit-autoupdate.yml Outdated Show resolved Hide resolved
Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

Looks good

@mikealfare mikealfare merged commit 62f3337 into main Sep 9, 2024
6 checks passed
@mikealfare mikealfare deleted the pre-commit-auto-update branch September 9, 2024 19:38
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.

2 participants