mirror of
				https://github.com/XRPLF/clio.git
				synced 2025-11-04 03:45:50 +00:00 
			
		
		
		
	I started with really simple pre-commit hooks and will add more on top. Important files: - `.pre-commit-config.yaml` - the config for pre-commit - `.github/workflows/pre-commit.yml` - runs pre-commit hooks in branches and `develop` - `.github/workflows/pre-commit-autoupdate.yml` - autoupdates pre-commit hooks once in a month
		
			
				
	
	
		
			40 lines
		
	
	
		
			1007 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			1007 B
		
	
	
	
		
			YAML
		
	
	
	
	
	
name: Pre-commit auto-update
 | 
						|
 | 
						|
on:
 | 
						|
  # every first day of the month
 | 
						|
  schedule:
 | 
						|
    - cron: "0 0 1 * *"
 | 
						|
  # on demand
 | 
						|
  workflow_dispatch:
 | 
						|
 | 
						|
jobs:
 | 
						|
  auto-update:
 | 
						|
    runs-on: ubuntu-latest
 | 
						|
 | 
						|
    permissions:
 | 
						|
      contents: write
 | 
						|
      pull-requests: write
 | 
						|
 | 
						|
    steps:
 | 
						|
      - uses: actions/checkout@v4
 | 
						|
 | 
						|
      - uses: actions/setup-python@v5
 | 
						|
        with:
 | 
						|
          python-version: 3.x
 | 
						|
 | 
						|
      - run: pip install pre-commit
 | 
						|
      - run: pre-commit autoupdate
 | 
						|
      - run: pre-commit run --all-files
 | 
						|
 | 
						|
      - uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
 | 
						|
        if: always()
 | 
						|
        env:
 | 
						|
          GH_REPO: ${{ github.repository }}
 | 
						|
          GH_TOKEN: ${{ github.token }}
 | 
						|
        with:
 | 
						|
          branch: update/pre-commit-hooks
 | 
						|
          title: Update pre-commit hooks
 | 
						|
          commit-message: "style: update pre-commit hooks"
 | 
						|
          body: Update versions of pre-commit hooks to latest version.
 | 
						|
          reviewers: "godexsoft,kuznetsss,PeterChen13579,mathbunnyru"
 |