Skip to content

Commit

Permalink
fix: closes #2, set my bot as auto-commit author
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-semenov committed May 15, 2024
1 parent 69c73bb commit 4b9c612
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ jobs:
run: |
chmod +x ./scripts/compile-grammar.sh
./scripts/compile-grammar.sh
shell: bash

- name: Compile Coverage Badge SVG
run: |
sudo apt-get install -y xsltproc
make -B $(pwd)/images/coverage-badge.svg
shell: bash

- name: Import GPG key
id: import-gpg
Expand All @@ -45,6 +47,7 @@ jobs:
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
echo "username: ${{ steps.import-gpg.outputs.name }}"
echo "email: ${{ steps.import-gpg.outputs.email }}"
shell: bash

- name: Auto-commit changes
id: auto-commit-action
Expand All @@ -54,9 +57,11 @@ jobs:
branch: main
commit_options: '--no-verify --signoff -S'
file_pattern: 'syntaxes/* images/*'
commit_author: "${{ steps.import-gpg.outputs.name }} <${{ steps.import-gpg.outputs.email }}>"
commit_user_name: "${{ steps.import-gpg.outputs.name }}"
commit_user_email: "${{ steps.import-gpg.outputs.email }}"

- name: Run if changes have been detected
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: echo "New TextMate grammar was published"
shell: bash
3 changes: 3 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
run: |
brew install pre-commit jsonlint yamllint shellcheck
vagrant plugin install vagrant-disksize
shell: bash

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -33,6 +34,8 @@ jobs:
- name: Show pre-commit logs
if: failure()
run: cat ~/.cache/pre-commit/pre-commit.log
shell: bash

- name: Show pre-commit version
run: pre-commit --version
shell: bash
8 changes: 6 additions & 2 deletions src/operators.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,9 @@ repository:
match: "(\\')(?!\\b)"
name: keyword.operator.derivative.parigp
-
match: '(\#)\b\s*(?!$)'
name: keyword.operator.cardinality.parigp
match: '(\#)(\s*)(?!$)'
captures:
1:
name: keyword.operator.cardinality.parigp
2:
name: constant.character.whitespace.parigp
9 changes: 9 additions & 0 deletions tests/operators.test.gp
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,12 @@
## ^^ source.parigp keyword.operator.shift.parigp
## ^ source.parigp constant.numeric.int.parigp
## ^ source.parigp markup.punctuation.statement-terminator.parigp

# [1, 2, 3]
##^ source.parigp keyword.operator.cardinality.parigp
## ^ source.parigp constant.character.whitespace.parigp
## ^ source.parigp meta.brackets.parigp punctuation.section.brackets.begin.parigp
## ^ ^ ^ source.parigp meta.brackets.parigp constant.numeric.int.parigp
## ^ ^ source.parigp meta.brackets.parigp markup.punctuation.separator.parigp
## ^ ^ source.parigp meta.brackets.parigp constant.character.whitespace.parigp
## ^ source.parigp meta.brackets.parigp punctuation.section.brackets.end.parigp

0 comments on commit 4b9c612

Please sign in to comment.