Comments (8)
I wonder if this makes more sense as a GitHub Action. There's already actions implemented for a number of linters and formatters: https://github.com/bltavares/actions
from pre-commit.com.
yeah this isn't possible to do safely with github actions -- so I made pre-commit.ci which is now the official way to run pre-commit in CI for github
from pre-commit.com.
Seems like a fine idea -- though I don't have the slightest idea on where to host such a thing however
I'm going to move this to the docs repo since it's less about the framework and more about ancillary tools.
I'd be happy to help set something like this up if there's interest and direction π
I believe @nicoddemus @RonnyPfannschmidt @obestwalter have expressed interest in a similar thing in the past as well, CCing them in case they have input
from pre-commit.com.
I really really really want to set up a github action but I haven't been allowlisted into the beta yet :'(
from pre-commit.com.
@Pierre-Sassoulas have you seen https://pre-commit.ci/? It is developed by the primary pre-commit maintainer and sounds like exactly what you want.
from pre-commit.com.
Seems like a fine idea -- though I don't have the slightest idea on where to host such a thing however
The Probot docs have deployment instructions for Glitch, Heroku, Now, GH Actions, AWS Lambda, and Google Cloud Functions: https://probot.github.io/docs/deployment .
from pre-commit.com.
The Restyled project (https://restyled.io/) uses GitHub actions to run formatters against PRs. I've suggested adding pre-commit support: restyled-io/restylers#29
from pre-commit.com.
This Github action would would save so much time. I found this existing action that look like a very close match. Maybe just adding pre-commit run --all-files
would work:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Create local changes
run: |
pre-commit run --all-files
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -m "Add changes" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
from pre-commit.com.
Related Issues (20)
- Add official shellcheck hook HOT 2
- (π) pre-commit-config section doesn't mention the `ci` key HOT 1
- document pre-commit in a merge-request pipeline HOT 1
- Link to `default_install_hook_types` is not correct HOT 4
- Documentation assumes incorrectly that a tag is an immutable ref - leading to a supply-chain security risk HOT 1
- Add sql-formatter hook HOT 2
- Add `Rome` formatter as a mirror. HOT 2
- Itβs not clear which languages canβt be used for local hooks HOT 2
- Version in docs is out of date HOT 1
- pre-commit ci incorrectly reports an error with the walrus operator (python 3.11) HOT 2
- License still necessary
- Ambiguous documentation HOT 1
- `pretty-format-json` timeout error HOT 3
- Filter hooks by language
- Bot keeps bumping ruff-pre-commit to incompatible release HOT 6
- Will a hook be accepted if one of the hooks in `.pre-commit-hooks.yaml` is `system`? HOT 3
- [pre-commit]: Spellcheck hook for source code and gitlab/github for commit messages and MR/PR descriptions HOT 1
- If possible, please remove stackoverflow from https://pre-commit.com/#getting-help HOT 2
- Hook fail_fast stops pre-commit if any prior hook fails HOT 2
- pipx installation option HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pre-commit.com.