Code Monkey home page Code Monkey logo

Comments (8)

sloria avatar sloria commented on June 23, 2024 2

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.

asottile avatar asottile commented on June 23, 2024 2

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.

asottile avatar asottile commented on June 23, 2024 1

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.

asottile avatar asottile commented on June 23, 2024 1

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.

chriskuehl avatar chriskuehl commented on June 23, 2024 1

@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.

sloria avatar sloria commented on June 23, 2024

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.

sloria avatar sloria commented on June 23, 2024

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.

Pierre-Sassoulas avatar Pierre-Sassoulas commented on June 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.