-
Notifications
You must be signed in to change notification settings - Fork 0
Add pre-commit #123
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
Add pre-commit #123
Changes from 10 commits
c720354
8df94ff
fd1a47b
634b450
00f8353
0c2a51e
7dfd64d
39b5f90
a2cfa6a
7c2051a
e3e77b2
ac64e86
f717c81
57b6f36
9100913
e8124d8
e0430bb
f8e4be2
b37ade1
6166391
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,27 @@ on: | |
branches: | ||
- main | ||
pull_request: | ||
permissions: read-all | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref_name }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
actions: write | ||
jobs: | ||
pre-commit: | ||
name: Pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- uses: actions/setup-python@v4 | ||
|
||
- uses: pre-commit/[email protected] | ||
- uses: pre-commit-ci/[email protected] | ||
if: always() | ||
format_codebase: | ||
name: Format Code | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
@@ -24,16 +35,19 @@ jobs: | |
- name: Format Codebase | ||
run: $TRUNK_PATH fmt --all --no-progress | ||
- name: Commit | ||
uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0 # v6 | ||
with: | ||
commit_message: Format the code | ||
run: | | ||
git config --global user.name "Mohamed Hisham Abdelzaher" | ||
git config --global user.email "[email protected]" | ||
git add . | ||
git commit -m "Formatting" | ||
git push | ||
trunk: | ||
name: Trunk Code Quality | ||
runs-on: ubuntu-latest | ||
permissions: | ||
checks: write | ||
contents: read | ||
needs: [format_codebase, compatibility] | ||
needs: [format_codebase, compatibility, pre-commit] | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | ||
|
Uh oh!
There was an error while loading. Please reload this page.