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

Pre-commit CI #230

Merged
merged 7 commits into from
Dec 15, 2023
Merged

Pre-commit CI #230

merged 7 commits into from
Dec 15, 2023

Conversation

fyliu
Copy link
Member

@fyliu fyliu commented Dec 15, 2023

What changes did you make?

  • adapted pre-commit config for ci
  • updated pre-commit config
  • updated and extended documentation for pre-commit
  • formatted documentation touched by pre-commit checks
  • removed local linters and fomatters

Why did you make the changes (we will use this info to test)?

  • We're using pre-commit for linting and formatting, so there's no need to also install the packages locally. Pre-commit manages its own environment that's separate from the project.
  • I had to switch some pre-commit hooks to ones that will also download the tools rather than rely on them being present in the local system, since they won't be available in the ci environment.
  • Some hooks are just outdated so I updated them.
  • There's a few new hooks that I thought were good to add.
  • I updated the documentation both to fix formatting and with content for the current changes.

Before and After

I created test PRs to show the CI service at work.
Before: this branch adds a squashed commit of the changes made in initial-data-migration-36. It has some linting problems that need fixing.

After: this is after fixing the linter issues. It is one more commit on top of the Before branch.

How to test

You will have to connect to the pre-commit.ci service in your fork in order for this to work in your fork. Just create PRs from the branches in my fork (or anywhere) to see it working.

I haven't connected it to the hackforla repo yet since the current pre-commit config we have doesn't quite work for ci.

Formatting fixed via mdformat and blacken-docs.
Replaced hadolint and shellcheck with ones that install into the
pre-commit environment.
Also switched to the recommended black mirror from their website.
@ethanstrominger
Copy link
Member

Hi

@fyliu fyliu merged commit 5f707c3 into hackforla:main Dec 15, 2023
@fyliu fyliu mentioned this pull request Dec 16, 2023
5 tasks
@fyliu fyliu deleted the pre-commit-ci branch June 5, 2024 19:07
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.

Set up linters on github to check PRs
2 participants