Skip to content

Commit 47791d4

Browse files
dazakdevgithub-advanced-security[bot]Copilotgrzanka
authored
GitHub actions to check formatting (#265)
* added pre-commit github action * well I am a good example why this change is required * Potential fix for code scanning alert no. 5: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * added --with test so github actions has pre-commit * Update .github/workflows/pre-commit.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update .github/workflows/pre-commit.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * changed from poetry installation to pip on pre-commit * Potential fix for code scanning alert no. 6: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * well the copilot broke some things * Update .github/workflows/pre-commit.yml Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl> * Update .github/workflows/pre-commit.yml Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl> * Update .github/workflows/pre-commit.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl>
1 parent 644ae88 commit 47791d4

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

.git-blame-ignore-revs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a93a5953bb63a9c2cb2ce5b6651be898850961b6
1+
a93a5953bb63a9c2cb2ce5b6651be898850961b6

.github/workflows/pre-commit.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: pre-commit
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches: [master]
7+
pull_request:
8+
branches: [master]
9+
10+
jobs:
11+
pre-commit:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v6
15+
- uses: actions/setup-python@v6
16+
with:
17+
python-version: '3.14'
18+
- name: Install pre-commit
19+
run: python -m pip install pre-commit==4.5.1
20+
- name: Run pre-commit
21+
run: pre-commit run --all-files --show-diff-on-failure

0 commit comments

Comments
 (0)