-
Notifications
You must be signed in to change notification settings - Fork 1
feat: onboarding github-app-auth-action action #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| dist/ | ||
| node_modules/ | ||
| coverage/ | ||
| .github/ |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| env: | ||
| node: true | ||
| es6: true | ||
|
|
||
| globals: | ||
| Atomics: readonly | ||
| SharedArrayBuffer: readonly | ||
|
|
||
| ignorePatterns: | ||
| - '!.*' | ||
| - '**/node_modules/.*' | ||
| - '**/dist/.*' | ||
| - '**/coverage/.*' | ||
| - '*.json' | ||
|
|
||
| parser: '@typescript-eslint/parser' | ||
|
|
||
| parserOptions: | ||
| ecmaVersion: 2023 | ||
| sourceType: module | ||
| project: | ||
| - './.github/linters/tsconfig.json' | ||
| - './tsconfig.json' | ||
|
|
||
| plugins: | ||
| - vitest | ||
| - '@typescript-eslint' | ||
|
|
||
| extends: | ||
| - eslint:recommended | ||
| - plugin:@typescript-eslint/eslint-recommended | ||
| - plugin:@typescript-eslint/recommended | ||
| - plugin:github/recommended | ||
| - plugin:vitest/legacy-recommended | ||
|
|
||
| settings: | ||
| import/resolver: | ||
| typescript: true | ||
|
|
||
| rules: | ||
| { | ||
| 'camelcase': 'off', | ||
| 'eslint-comments/no-use': 'off', | ||
| 'eslint-comments/no-unused-disable': 'off', | ||
| 'i18n-text/no-en': 'off', | ||
| 'import/no-namespace': 'off', | ||
| 'no-console': 'off', | ||
| 'no-unused-vars': 'off', | ||
| 'prettier/prettier': 'error', | ||
| 'semi': 'off', | ||
| '@typescript-eslint/array-type': 'error', | ||
| '@typescript-eslint/await-thenable': 'error', | ||
| '@typescript-eslint/ban-ts-comment': 'error', | ||
| '@typescript-eslint/consistent-type-assertions': 'error', | ||
| '@typescript-eslint/explicit-member-accessibility': | ||
| ['error', { 'accessibility': 'no-public' }], | ||
| '@typescript-eslint/explicit-function-return-type': | ||
| ['error', { 'allowExpressions': true }], | ||
| '@typescript-eslint/func-call-spacing': ['error', 'never'], | ||
| '@typescript-eslint/no-array-constructor': 'error', | ||
| '@typescript-eslint/no-empty-interface': 'error', | ||
| '@typescript-eslint/no-explicit-any': 'error', | ||
| '@typescript-eslint/no-extraneous-class': 'error', | ||
| '@typescript-eslint/no-for-in-array': 'error', | ||
| '@typescript-eslint/no-inferrable-types': 'error', | ||
| '@typescript-eslint/no-misused-new': 'error', | ||
| '@typescript-eslint/no-namespace': 'error', | ||
| '@typescript-eslint/no-non-null-assertion': 'warn', | ||
| '@typescript-eslint/no-require-imports': 'error', | ||
| '@typescript-eslint/no-unnecessary-qualifier': 'error', | ||
| '@typescript-eslint/no-unnecessary-type-assertion': 'error', | ||
| '@typescript-eslint/no-unused-vars': 'error', | ||
| '@typescript-eslint/no-useless-constructor': 'error', | ||
| '@typescript-eslint/no-var-requires': 'error', | ||
| '@typescript-eslint/prefer-for-of': 'warn', | ||
| '@typescript-eslint/prefer-function-type': 'warn', | ||
| '@typescript-eslint/prefer-includes': 'error', | ||
| '@typescript-eslint/prefer-string-starts-ends-with': 'error', | ||
| '@typescript-eslint/promise-function-async': 'error', | ||
| '@typescript-eslint/require-array-sort-compare': 'error', | ||
| '@typescript-eslint/restrict-plus-operands': 'error', | ||
| '@typescript-eslint/semi': 'error', | ||
| '@typescript-eslint/space-before-function-paren': 'off', | ||
| '@typescript-eslint/type-annotation-spacing': 'error', | ||
| '@typescript-eslint/unbound-method': 'error' | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Unordered list style | ||
| MD004: | ||
| style: dash | ||
|
|
||
| # Ordered list item prefix | ||
| MD029: | ||
| style: one |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| rules: | ||
| document-end: disable | ||
| document-start: | ||
| level: warning | ||
| present: false | ||
| line-length: | ||
| level: warning | ||
| max: 80 | ||
| allow-non-breakable-words: true | ||
| allow-non-breakable-inline-mappings: true |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/tsconfig", | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "noEmit": true | ||
| }, | ||
| "include": ["../../__tests__/**/*", "../../src/**/*"], | ||
| "exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"] | ||
| } |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: Release GitHub Actions | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| tag: | ||
| description: "Tag for the release" | ||
| required: true | ||
| node_version: | ||
| description: "Node.js version to use" | ||
| required: false | ||
| default: "24" | ||
| script: | ||
| description: "Build script to run" | ||
| required: false | ||
| default: "yarn package" | ||
| yarn_version: | ||
| description: "Yarn version to use" | ||
| required: false | ||
| default: "4" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| release: | ||
| permissions: | ||
| actions: read | ||
| id-token: write | ||
| contents: write | ||
|
|
||
| uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1 | ||
| with: | ||
| tag: "${{ github.event.inputs.tag }}" | ||
| node_version: ${{ inputs.node_version || '24' }} | ||
| script: ${{ inputs.script || 'yarn package' }} | ||
| yarn_version: ${{ inputs.yarn_version || '4' }} |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: NPM Audit Fix Run | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| force: | ||
| description: "Use --force flag for npm audit fix?" | ||
| required: true | ||
| type: boolean | ||
| base_branch: | ||
| description: "Specify a base branch" | ||
| required: false | ||
| default: "main" | ||
| node_version: | ||
| description: "Node.js version to use" | ||
| required: false | ||
| default: "24" | ||
| script: | ||
| description: "Build script to run" | ||
| required: false | ||
| default: "yarn package" | ||
| package_manager: | ||
| description: "Package manager to use" | ||
| required: false | ||
| default: "yarn" | ||
| yarn_version: | ||
| description: "Yarn version to use" | ||
| required: false | ||
| default: "4" | ||
| schedule: | ||
| - cron: "0 0 * * 1" | ||
|
|
||
| jobs: | ||
| audit-fix: | ||
| uses: step-security/reusable-workflows/.github/workflows/audit_fix.yml@v1 | ||
| with: | ||
| force: ${{ inputs.force || false }} | ||
| base_branch: ${{ inputs.base_branch || 'main' }} | ||
| node_version: ${{ inputs.node_version || '24' }} | ||
| script: ${{ inputs.script || 'yarn package' }} | ||
| package_manager: ${{ inputs.package_manager || 'yarn' }} | ||
| yarn_version: ${{ inputs.yarn_version || '4' }} | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| packages: read | ||
| issues: write |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| name: Auto Cherry-Pick from Upstream | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: [ "Release GitHub Actions" ] | ||
| types: | ||
| - completed | ||
|
|
||
| workflow_dispatch: | ||
| inputs: | ||
| base_branch: | ||
| description: "Base branch to create the PR against" | ||
| required: true | ||
| default: "main" | ||
| mode: | ||
| description: "Run mode: cherry-pick or verify" | ||
| required: false | ||
| default: "cherry-pick" | ||
| node_version: | ||
| description: "Node.js version to use" | ||
| required: false | ||
| default: "24" | ||
| script: | ||
| description: "Build script to run" | ||
| required: false | ||
| default: "yarn package" | ||
| package_manager: | ||
| description: "Package manager to use" | ||
| required: false | ||
| default: "yarn" | ||
| yarn_version: | ||
| description: "Yarn version to use" | ||
| required: false | ||
| default: "4" | ||
|
|
||
| pull_request: | ||
| types: [ opened, synchronize, labeled ] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| packages: read | ||
| issues: write | ||
|
|
||
| jobs: | ||
| cherry-pick: | ||
| if: (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') || github.event_name == 'workflow_dispatch' || contains(fromJson(toJson(github.event.pull_request.labels)).*.name, 'review-required') | ||
| uses: step-security/reusable-workflows/.github/workflows/auto_cherry_pick.yaml@v1 | ||
| with: | ||
| original-owner: "electron" | ||
| repo-name: "github-app-auth-action" | ||
| base_branch: ${{ inputs.base_branch || 'main' }} | ||
| mode: ${{ github.event_name == 'pull_request' && 'verify' || inputs.mode || 'cherry-pick' }} | ||
| node_version: ${{ inputs.node_version || '24' }} | ||
| script: ${{ inputs.script || 'yarn package' }} | ||
| package_manager: ${{ inputs.package_manager || 'yarn' }} | ||
| yarn_version: ${{ inputs.yarn_version || '4' }} |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # In TypeScript actions, `dist/` is a special directory. When you reference | ||
| # an action with the `uses:` property, `dist/index.js` is the code that will be | ||
| # run. For this project, the `dist/index.js` file is transpiled from other | ||
| # source files. This workflow ensures the `dist/` directory contains the | ||
| # expected transpiled code. | ||
| # | ||
| # If this workflow is run from a feature branch, it will act as an additional CI | ||
| # check and fail if the checked-in `dist/` directory does not match what is | ||
| # expected from the build. | ||
| name: Check Transpiled JavaScript | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| check-dist: | ||
| name: Check dist/ | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| id: checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Node.js | ||
| id: setup-node | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: 24 | ||
| cache: yarn | ||
|
|
||
| - name: Install Dependencies | ||
| id: install | ||
| run: yarn install --immutable | ||
|
|
||
| - name: Build dist/ Directory | ||
| id: build | ||
| run: yarn bundle | ||
|
|
||
| # This will fail the workflow if the PR wasn't created by Dependabot. | ||
| - name: Compare Directories | ||
| id: diff | ||
| run: | | ||
| if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then | ||
| echo "Detected uncommitted changes after build. See status below:" | ||
| git diff --ignore-space-at-eol --text dist/ | ||
| exit 1 | ||
| fi | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test-typescript: | ||
| name: TypeScript Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v7 | ||
| with: | ||
| node-version: 24 | ||
| cache: yarn | ||
| - name: Install Dependencies | ||
| run: yarn install --immutable | ||
| - name: Check Format | ||
| run: yarn format:check | ||
| - name: Lint | ||
| run: yarn lint | ||
| - name: Test | ||
| run: yarn ci-test | ||
|
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.