Automated: Auto Fix Linter (#15) #167
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI / Lint | |
on: | |
schedule: | |
- cron: '0 */4 * * *' | |
push: | |
branches: ['dev', '**'] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
packages: read | |
statuses: write | |
jobs: | |
auto-fix: | |
name: Auto Fix Linter Issues | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout | |
id: checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
- name: Install Dependencies | |
id: install | |
run: npm run setup | |
- name: Run Auto Fixer | |
run: git config advice.mergeConflict false; npm run auto-fix | |
- name: Create PR | |
id: create-pr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
delete-branch: true | |
title: 'Automated: Auto Fix Linter' | |
committer: 'Hamster [bot] <TheHamsterBot@outlook.com>' | |
commit-message: 'Publish Linter Changes and Fixes' | |
branch: 'auto-fixer/linter' | |
assignees: 'TheHamsterBot' | |
labels: | | |
bot | |
automated | |
hamster | |
reviewers: offensive-vk | |
base: dev | |
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
body: | | |
## This Pull Request Was Automated by [Hamster [bot]](https://github.com/TheHamsterBot) | |
> [!NOTE] | |
> Workflow Trigger: ${{ github.event_name }} event ${{ github.event_name }} | |
> Details of Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
- Author: @TheHamsterBot | |
- Branch: ${{ github.event.base_ref }} (base) / ${{ github.event.head_ref }} (head) | |
- Commit: ${{ github.sha }} | |
- Workflow Path: ${{ github.workflow }} | |
- Pusher Details: ${{ github.event.pusher.name }} - ${{ github.event.pusher.email }} | |
- Commit Info: ${{ github.event.head_commit.message }} | |
--- | |
Thanks. | |
Your Hamster 🐹 <code>PF78VAPPKLZ2</code> | |
lint: | |
name: Begin Linting | |
runs-on: ubuntu-latest | |
needs: [auto-fix] | |
continue-on-error: true | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Checkout Base Branch | |
id: checkout-base-branch | |
uses: actions/checkout@v4 | |
with: | |
ref: 'auto-fixer/linter' | |
fetch-depth: 0 | |
- name: Setup Node.js | |
id: setup-node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: npm | |
- name: Install Dependencies | |
id: install | |
run: npm run setup | |
- name: Lint Codebase | |
id: super-linter | |
uses: super-linter/super-linter/slim@v7 | |
env: | |
DEFAULT_BRANCH: 'auto-fixer/linter' | |
FILTER_REGEX_EXCLUDE: dist/**/* | |
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }} | |
VALIDATE_ALL_CODEBASE: true | |
VALIDATE_JAVASCRIPT_STANDARD: false | |
VALIDATE_JSCPD: false | |
VALIDATE_TYPESCRIPT_STANDARD: false |