Skip to content

Commit

Permalink
Add support for master branch in TEMPLATES/mega-linter.yml (oxsecurit…
Browse files Browse the repository at this point in the history
…y#2888)

* Add support for master default branch

* Update CHANGELOG.md

* Update CHANGELOG.md

* Add rasa and itayox to .cspell.json

* Update mega-linter.yml
  • Loading branch information
rasa authored Aug 23, 2023
1 parent 3f43fd5 commit 83d5dc4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@
"isort's",
"itertools",
"itshape",
"itayox",
"janderssonse",
"jarfile",
"jarpath",
Expand Down Expand Up @@ -1177,6 +1178,7 @@
"rakumod",
"rakutest",
"randombytes",
"rasa",
"rawhtml",
"rbenv",
"rcfile",
Expand Down Expand Up @@ -1457,4 +1459,4 @@
"zaach",
"zricethezav"
]
}
}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l

- Workflow job name changed from `build` to `megalinter` to prevent conflicts with other workflows
- Secretlint logo - reduce size to 150 and remove background
- Add support for master branch in TEMPLATES/mega-linter.yml, by @rasa
- Fix rstcheck options & install
- Deprecate SCSS LINT as not maintained anymore (<https://github.com/sds/scss-lint#notice-consider-other-tools-before-adopting-scss-lint>)

Expand Down
10 changes: 5 additions & 5 deletions TEMPLATES/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
# All available variables are described in documentation
# https://megalinter.io/configuration/
env:

# Validates all source when push on main, else just the git diff with
# main. Override with true if you always want to lint all sources
#
Expand All @@ -82,12 +82,12 @@ jobs:
# VALIDATE_ALL_CODEBASE: >-
# ${{
# github.event_name == 'push' &&
# github.ref == 'refs/heads/main'
# contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
# }}
VALIDATE_ALL_CODEBASE: >-
${{
github.event_name == 'push' &&
github.ref == 'refs/heads/main'
contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)
}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
env.APPLY_FIXES_EVENT == github.event_name
) &&
env.APPLY_FIXES_MODE == 'commit' &&
github.ref != 'refs/heads/main' &&
(!contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)) &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
Expand All @@ -172,7 +172,7 @@ jobs:
env.APPLY_FIXES_EVENT == github.event_name
) &&
env.APPLY_FIXES_MODE == 'commit' &&
github.ref != 'refs/heads/main' &&
(!contains(fromJSON('["refs/heads/main", "refs/heads/master"]'), github.ref)) &&
(
github.event_name == 'push' ||
github.event.pull_request.head.repo.full_name == github.repository
Expand Down

0 comments on commit 83d5dc4

Please sign in to comment.