diff --git a/.github/settings.yml b/.github/settings.yml index bfbdbf8..be09035 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -12,7 +12,7 @@ branches: protection: required_status_checks: strict: true - contexts: ['Test', 'Release', 'Renovate / Renovate'] + contexts: [Test, Release, Renovate / Renovate] enforce_admins: true required_pull_request_reviews: null restrictions: null diff --git a/.github/workflows/app.yaml b/.github/workflows/app.yaml index b4642d0..4241109 100644 --- a/.github/workflows/app.yaml +++ b/.github/workflows/app.yaml @@ -1,7 +1,7 @@ --- name: GitHub App -'on': +on: issues: types: - opened diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 533228b..49ed1f7 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,7 +1,7 @@ --- name: Main -'on': +on: push: branches: [main] pull_request: diff --git a/.github/workflows/renovate.yaml b/.github/workflows/renovate.yaml index b5a79d2..b21fc98 100644 --- a/.github/workflows/renovate.yaml +++ b/.github/workflows/renovate.yaml @@ -2,7 +2,7 @@ # Renovate this repository if Renovate-specific tasks are checked or if dispatched. name: Renovate -'on': +on: issues: types: [edited] pull_request: @@ -17,9 +17,9 @@ name: Renovate type: boolean default: false workflow_run: - workflows: ['Main'] - branches: ['main'] - types: ['completed'] + workflows: [Main] + branches: [main] + types: [completed] jobs: renovate: diff --git a/.github/workflows/update-repo-settings.yaml b/.github/workflows/update-repo-settings.yaml index f8490bb..bdd39fc 100644 --- a/.github/workflows/update-repo-settings.yaml +++ b/.github/workflows/update-repo-settings.yaml @@ -2,7 +2,7 @@ --- name: Update Repo Settings -'on': +on: push: branches: [main] schedule: diff --git a/.releaserc.yaml b/.releaserc.yaml index afa2dfe..5c7130c 100644 --- a/.releaserc.yaml +++ b/.releaserc.yaml @@ -6,7 +6,7 @@ plugins: - '@semantic-release/release-notes-generator' - - '@semantic-release/git' - - assets: ['dist/index.js'] + - assets: [dist/index.js] message: 'build(release): compiled action for ${nextRelease.version} [skip ci]' - - '@semantic-release/github' @@ -27,28 +27,28 @@ preset: conventionalcommits presetConfig: types: - type: feat - section: 'Features' + section: Features - type: features - section: 'Features' + section: Features - type: build - section: 'Build System' + section: Build System - type: fix - section: 'Bug Fixes' + section: Bug Fixes - type: docs - section: 'Documentation' + section: Documentation - type: test - section: 'Tests' + section: Tests - type: ci - section: 'Continuous Integration' + section: Continuous Integration - type: style - section: 'Styles' + section: Styles - type: refactor - section: 'Code Refactoring' + section: Code Refactoring - type: perf - section: 'Performance Improvements' + section: Performance Improvements - type: revert - section: 'Reverts' + section: Reverts - type: chore - section: 'Miscellaneous Chores' + section: Miscellaneous Chores - type: skip hidden: true diff --git a/action.yaml b/action.yaml index 4b2b822..f014be0 100644 --- a/action.yaml +++ b/action.yaml @@ -2,8 +2,8 @@ name: GitHub App as a GitHub Action description: 'GitHub App as a GitHub Action [Template]' branding: - icon: 'gift' + icon: gift color: orange runs: - using: 'node20' - main: 'dist/index.js' + using: node20 + main: dist/index.js diff --git a/package.json b/package.json index de1233b..16b012d 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,9 @@ "@swc/core": "1.10.1", "@vitest/eslint-plugin": "1.1.17", "conventional-changelog-conventionalcommits": "8.0.0", + "eslint-config-prettier": "9.1.0", "eslint-plugin-no-only-tests": "3.3.0", + "eslint-plugin-prettier": "5.2.1", "jiti": "2.4.1", "nock": "13.5.6", "prettier": "3.4.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c54bd05..098c911 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,7 +17,7 @@ importers: devDependencies: '@bfra.me/eslint-config': specifier: 0.12.1 - version: 0.12.1(@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(@vitest/eslint-plugin@1.1.17(@typescript-eslint/utils@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-no-only-tests@3.3.0)(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + version: 0.12.1(@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(@vitest/eslint-plugin@1.1.17(@typescript-eslint/utils@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-no-only-tests@3.3.0)(eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(prettier@3.4.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) '@bfra.me/prettier-config': specifier: 0.13.7 version: 0.13.7(prettier@3.4.2) @@ -33,9 +33,15 @@ importers: conventional-changelog-conventionalcommits: specifier: 8.0.0 version: 8.0.0 + eslint-config-prettier: + specifier: 9.1.0 + version: 9.1.0(eslint@9.17.0(jiti@2.4.1)) eslint-plugin-no-only-tests: specifier: 3.3.0 version: 3.3.0 + eslint-plugin-prettier: + specifier: 5.2.1 + version: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(prettier@3.4.2) jiti: specifier: 2.4.1 version: 2.4.1 @@ -617,7 +623,6 @@ packages: resolution: {integrity: sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-powerpc64le-gnu@4.28.1': resolution: {integrity: sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A==} @@ -1487,6 +1492,12 @@ packages: peerDependencies: eslint: ^9.5.0 + eslint-config-prettier@9.1.0: + resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} + hasBin: true + peerDependencies: + eslint: '>=7.0.0' + eslint-flat-config-utils@0.4.0: resolution: {integrity: sha512-kfd5kQZC+BMO0YwTol6zxjKX1zAsk8JfSAopbKjKqmENTJcew+yBejuvccAg37cvOrN0Mh+DVbeyznuNWEjt4A==} @@ -1549,6 +1560,20 @@ packages: peerDependencies: eslint: '>=8.0.0' + eslint-plugin-prettier@5.2.1: + resolution: {integrity: sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + '@types/eslint': '>=8.0.0' + eslint: '>=8.0.0' + eslint-config-prettier: '*' + prettier: '>=3.0.0' + peerDependenciesMeta: + '@types/eslint': + optional: true + eslint-config-prettier: + optional: true + eslint-plugin-regexp@2.7.0: resolution: {integrity: sha512-U8oZI77SBtH8U3ulZ05iu0qEzIizyEDXd+BWHvyVxTOjGwcDcvy/kEpgFG4DYca2ByRLiVPFZ2GeH7j1pdvZTA==} engines: {node: ^18 || >=20} @@ -1659,6 +1684,9 @@ packages: fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + fast-diff@1.3.0: + resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} + fast-glob@3.3.2: resolution: {integrity: sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==} engines: {node: '>=8.6.0'} @@ -2830,6 +2858,10 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier-linter-helpers@1.0.0: + resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} + engines: {node: '>=6.0.0'} + prettier@3.4.2: resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} engines: {node: '>=14'} @@ -3579,7 +3611,7 @@ snapshots: '@babel/helper-validator-identifier@7.25.9': {} - '@bfra.me/eslint-config@0.12.1(@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(@vitest/eslint-plugin@1.1.17(@typescript-eslint/utils@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-plugin-no-only-tests@3.3.0)(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': + '@bfra.me/eslint-config@0.12.1(@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(@vitest/eslint-plugin@1.1.17(@typescript-eslint/utils@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)))(eslint-plugin-no-only-tests@3.3.0)(eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(prettier@3.4.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2)': dependencies: '@eslint-community/eslint-plugin-eslint-comments': 4.4.1(eslint@9.17.0(jiti@2.4.1)) '@eslint/markdown': 6.2.1 @@ -3606,7 +3638,9 @@ snapshots: yaml-eslint-parser: 1.2.3 optionalDependencies: '@vitest/eslint-plugin': 1.1.17(@typescript-eslint/utils@8.18.0(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2))(eslint@9.17.0(jiti@2.4.1))(typescript@5.7.2) + eslint-config-prettier: 9.1.0(eslint@9.17.0(jiti@2.4.1)) eslint-plugin-no-only-tests: 3.3.0 + eslint-plugin-prettier: 5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(prettier@3.4.2) transitivePeerDependencies: - '@eslint/json' - '@typescript-eslint/eslint-plugin' @@ -4942,6 +4976,10 @@ snapshots: eslint: 9.17.0(jiti@2.4.1) find-up-simple: 1.0.0 + eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)): + dependencies: + eslint: 9.17.0(jiti@2.4.1) + eslint-flat-config-utils@0.4.0: dependencies: pathe: 1.1.2 @@ -5045,6 +5083,15 @@ snapshots: - supports-color - typescript + eslint-plugin-prettier@5.2.1(eslint-config-prettier@9.1.0(eslint@9.17.0(jiti@2.4.1)))(eslint@9.17.0(jiti@2.4.1))(prettier@3.4.2): + dependencies: + eslint: 9.17.0(jiti@2.4.1) + prettier: 3.4.2 + prettier-linter-helpers: 1.0.0 + synckit: 0.9.2 + optionalDependencies: + eslint-config-prettier: 9.1.0(eslint@9.17.0(jiti@2.4.1)) + eslint-plugin-regexp@2.7.0(eslint@9.17.0(jiti@2.4.1)): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.17.0(jiti@2.4.1)) @@ -5260,6 +5307,8 @@ snapshots: fast-deep-equal@3.1.3: {} + fast-diff@1.3.0: {} + fast-glob@3.3.2: dependencies: '@nodelib/fs.stat': 2.0.5 @@ -6476,6 +6525,10 @@ snapshots: prelude-ls@1.2.1: {} + prettier-linter-helpers@1.0.0: + dependencies: + fast-diff: 1.3.0 + prettier@3.4.2: {} pretty-ms@9.2.0: diff --git a/test/app.test.js b/test/app.test.js index 37f5719..6705edc 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -1,3 +1,4 @@ +import process from 'node:process' import nock from 'nock' import {Probot, ProbotOctokit} from 'probot'