Skip to content

Commit bc68468

Browse files
authored
Make Github ignore Matlab (*.m) files for detecting programming language. (#14)
Solution from https://dev.to/katkelly/changing-your-repo-s-language-in-github-5gjo
1 parent d7cd314 commit bc68468

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.m linguist-detectable=false

.github/workflows/pre_commit.yaml

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
name: pre-commit
22

3-
on: [push]
3+
# Won't run on develop/main directly
4+
on: [pull_request]
45

56
jobs:
67
pre-commit:
78
runs-on: ubuntu-latest
89
steps:
910
- uses: actions/checkout@v3
11+
with:
12+
ref: ${{ github.event.pull_request.head.ref }}
1013
- uses: actions/setup-python@v3
1114
- uses: pre-commit/[email protected]
15+
- uses: EndBug/[email protected]
16+
# Only need to try and commit if the action failed
17+
if: failure()
18+
with:
19+
fetch: false
20+
committer_name: GitHub Actions
21+
committer_email: [email protected]
22+
message: Apply pre-commmit fixes
23+

0 commit comments

Comments
 (0)