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

Moved pre-commit support to github.com/pre-commit/mirrors-prettier #8937

Merged
merged 8 commits into from Nov 16, 2020

Conversation

FloChehab
Copy link
Contributor

@FloChehab FloChehab commented Aug 8, 2020

Follow up to discussions in: #8925

  • Make current pre-commit hook fail,
  • Updated docs to reflect the change.

Closes #8925
Fixes #9459

  • [NA] I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

* Make current hook fail,
* Updated docs to reflect the change.

Closes prettier#8925
@FloChehab
Copy link
Contributor Author

Hi @fisker, here is the PR we were discussing in #8925 (comment) .

Regarding the CHANGELOG:

(If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md.

I guess this change is user facing, but I am not sure it feats in one of the given folders. Any suggestion if and where I should mention it ?

@FloChehab FloChehab marked this pull request as ready for review August 8, 2020 12:25
@FloChehab FloChehab changed the title Moved pre-commit support to github.com/prettier/pre-commit [DO NOT MERGE] Moved pre-commit support to github.com/prettier/pre-commit Aug 8, 2020
@FloChehab
Copy link
Contributor Author

Also, I am marking this PR as "do not merge" while prettier/pre-commit#1 is not closed.

@fisker
Copy link
Sponsor Member

fisker commented Aug 8, 2020

Maybe cli/ dir, it run through cli.

@FloChehab
Copy link
Contributor Author

Done ✔️

@fisker fisker changed the title [DO NOT MERGE] Moved pre-commit support to github.com/prettier/pre-commit Moved pre-commit support to github.com/prettier/pre-commit Oct 21, 2020
@fisker fisker requested a review from a team October 21, 2020 05:42
@sosukesuzuki
Copy link
Member

I removed changelog because it is added via 533c107 on #9589 for 2.2 release blog

@FloChehab
Copy link
Contributor Author

Just wanted to say thanks for moving this PR forward, if you need something from me, feel free to ask.

@fisker
Copy link
Sponsor Member

fisker commented Nov 6, 2020

One note to @sosukesuzuki , after release, the docs change will not effect stable version, so we need update website/versioned_docs

@sosukesuzuki sosukesuzuki mentioned this pull request Nov 6, 2020
13 tasks
@fisker fisker changed the title Moved pre-commit support to github.com/prettier/pre-commit Moved pre-commit support to github.com/pre-commit/mirrors-prettier Nov 16, 2020
@fisker
Copy link
Sponsor Member

fisker commented Nov 16, 2020

pre-commit have setup a repo to support it

Changelog will add in #9589

@fisker fisker merged commit ed49bf1 into prettier:master Nov 16, 2020
mcdonnnj added a commit to cisagov/skeleton-generic that referenced this pull request Dec 16, 2020
Per prettier/prettier#8937 the pre-commit hook has
been moved to https://github.com/pre-commit/mirrors-prettier. I have also
updated to the latest version in that repository.
felddy added a commit to felddy/foundryvtt-docker that referenced this pull request Jan 7, 2021
* Insist that the cisagov devs are the owners of the .github directory

This additional clause must remain at the _end_ of the CODEOWNERS file
so that it cannot be overridden by a later clause.

We want to make it so that all the .github files including CODEOWNERS
are protected so only code owners (the dev team) can approve
modifications to them.

This will prevent configuration changes from breaking Actions and
other management-type functions that the files in this directory
control. By setting the .github files/folder to require code owner
approval for changes, workflow and management changes will require dev
team review and checking.

Resolves #56.

* Remove offending slash

Thanks to @dav3r and @mcdonnnj for the suggestion.

* Use the python version output by actions/setup-python

There is no need to run python code to determine the python version.
Resolves #58.

See here for details:
https://github.com/actions/setup-python/blob/main/action.yml#L14-L16

* Organize pre-commit hooks

Group related pre-commit hooks together. Make sure that hooks are
alphabetically sorted within those groups.

* Fix test job missing Python version in cache key

* Clean up our actions/cache step

Removed name because it was not more informative than the default. Swapped out
a hardcoded job reference for the github.job context value. Switch the base
cache key to a step environment value so we can set it once and reuse. Removed
additional restore-key value that might have undesirable results.

* Update remaining actions/cache uses

Make sure all actions/cache steps are in-line with the changes made to the lint
job's step.

* Update prettier hook details

Per prettier/prettier#8937 the pre-commit hook has
been moved to https://github.com/pre-commit/mirrors-prettier. I have also
updated to the latest version in that repository.

* Update black hook repo url

At some point the python GitHub organization renamed to psf (Python Software
Foundation). Although it redirects with no issue, I think it should be updated
to reflect the current repository URL.

* Remove trailing '.git's from repository URLs

Two hooks had trailing '.git's in the URLs. Although this is not a problem, we
should be consistent in how we format things.

* Enable two additional hooks from default pre-commit-hooks

Enabled 'check-case-conflict' because of our mixed Linux and macOS development.
Although APFS supports case-sensitive containers, it is not the default as far
as I am aware. Linux filesystems are typically case-sensitive however.

With the merge of cisagov/development-guide#42 we now
have a TOML file in a repository, so it does not hurt to add this hook in case
more are added in the future.

* Run pre-commit autoupdate

* Update repo URL for the isort hook

I missed that this repository was transfered from the creator, Timothy Crosley,
to the PyCQA organization.

* Update ansible-lint hook URL

* Run pre-commit autoupdate

* Add the pre-commit-packer repo and hooks

* Add the --strict flag to the yamllint pre-commot hook

The --strict flag will cause the yamllint hook to exit with a non-zero exit
code when warnings are found instead of only when errors are found.

Co-authored-by: Jeremy Frasier <jeremy.frasier@trio.dhs.gov>
Co-authored-by: Nicholas McDonnell <50747025+mcdonnnj@users.noreply.github.com>
Co-authored-by: felddy <felddy@github.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-commit is broken when installing Suggestion: move pre-commit support to another repo
4 participants