-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
42,803 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist/ | ||
lib/ | ||
node_modules/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"plugins": ["jest", "@typescript-eslint"], | ||
"extends": ["plugin:github/recommended"], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 9, | ||
"sourceType": "module", | ||
"project": "./tsconfig.json" | ||
}, | ||
"rules": { | ||
"eslint-comments/no-use": "off", | ||
"import/no-namespace": "off", | ||
"i18n-text/no-en": "off", | ||
"no-unused-vars": "off", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"@typescript-eslint/explicit-member-accessibility": ["error", {"accessibility": "no-public"}], | ||
"@typescript-eslint/no-require-imports": "error", | ||
"@typescript-eslint/array-type": "error", | ||
"@typescript-eslint/await-thenable": "error", | ||
"camelcase": "off", | ||
"@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-floating-promises": "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-unnecessary-qualifier": "error", | ||
"@typescript-eslint/no-unnecessary-type-assertion": "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", | ||
"semi": "off", | ||
"@typescript-eslint/semi": ["error", "never"], | ||
"@typescript-eslint/type-annotation-spacing": "error", | ||
"@typescript-eslint/unbound-method": "error" | ||
}, | ||
"env": { | ||
"node": true, | ||
"es6": true, | ||
"jest/globals": true | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Bug | ||
description: File a bug report | ||
title: "[Bug]: " | ||
labels: [bug] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Before opening a bug report, please search for the behavior in the existing issues. | ||
--- | ||
Thank you for taking the time to file a bug report. To address this bug as fast as possible, we need some information. | ||
- type: input | ||
id: os | ||
attributes: | ||
label: Operating system | ||
description: Which operating system do you use? Please provide the version as well. | ||
placeholder: "macOS Big Sur 11.5.2" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: bug-description | ||
attributes: | ||
label: Bug description | ||
description: What happened? | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: steps | ||
attributes: | ||
label: Steps to reproduce | ||
description: Which steps do we need to take to reproduce this error? | ||
- type: textarea | ||
id: logs | ||
attributes: | ||
label: Relevant log output | ||
description: If applicable, provide relevant log output. | ||
render: shell |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Feature Request | ||
description: Suggest an idea for this project | ||
title: "[Feature]: " | ||
labels: [enhancement] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Before opening a feature report, please search for the behavior in the existing issues. | ||
--- | ||
Thank you for taking the time to file a feature suggestion. To process this as fast as possible, we need some information. | ||
--- | ||
- type: textarea | ||
id: feat-description | ||
attributes: | ||
label: Describe the solution you'd like | ||
description: A clear and concise description of what you want to happen. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: feat-references | ||
attributes: | ||
label: Relevant examples or references | ||
description: Miscellaneous information that will assist in solving the issue. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: feat-additional | ||
attributes: | ||
label: Additional information | ||
description: Anything to give further context to the requested new feature. | ||
validations: | ||
required: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Question | ||
description: Ask a question to the maintainer | ||
title: "[Question]: " | ||
labels: [question] | ||
|
||
body: | ||
- type: markdown | ||
attributes: | ||
value: | | ||
Before opening a question, please search for the behavior in the existing issues. | ||
--- | ||
Thank you for taking the time to file a query. To process this as fast as possible, we need some information. | ||
--- | ||
- type: textarea | ||
id: question-description | ||
attributes: | ||
label: Your Query | ||
description: A clear and concise query of what you want to ask. | ||
validations: | ||
required: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
area/distribution: | ||
- "dist/**/*" | ||
area/github: | ||
- ".github/**/*" | ||
area/source: | ||
- "src/**/*" | ||
area/vscode: | ||
- ".vscode/**/*" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- "ignore for release" | ||
categories: | ||
- title: "✨ New Features" | ||
labels: | ||
- "enhancement" | ||
- title: "🐛 Bug Fixes" | ||
labels: | ||
- "bug" | ||
- title: "📚 Documentation" | ||
labels: | ||
- "documentation" | ||
- title: "⬆️ Dependencies" | ||
labels: | ||
- "dependencies" | ||
- title: "💥 Breaking Changes" | ||
labels: | ||
- "breaking change" | ||
- title: "🔨 Other Changes" | ||
labels: | ||
- "*" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: "📁 Changeset size" | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
labeler: | ||
name: "Changeset size" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Labeler" | ||
uses: actions/labeler@v4 | ||
with: | ||
configuration-path: .github/labeler.yml | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: "Label size" | ||
uses: pascalgn/size-label-action@v0.4.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
sizes: > | ||
{ | ||
"0": "XS", | ||
"20": "S", | ||
"50": "M", | ||
"200": "L", | ||
"800": "XL", | ||
"2000": "XXL" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: "🎉 Release" | ||
run-name: "Create release ${{ github.event.inputs.tag }}" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "The release tag" | ||
required: true | ||
type: string | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
release: | ||
name: "Release" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: "Release" | ||
uses: innofactororg/github-action-create-release@v1 | ||
with: | ||
tag: ${{ github.event.inputs.tag }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: "👀 Build and Test" | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
types: ["opened", "synchronize"] | ||
paths-ignore: | ||
- "**.md" | ||
push: | ||
branches: | ||
- "main" | ||
- "releases/*" | ||
paths-ignore: | ||
- "**.md" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
name: "Build" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: "Setup node" | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: "Checkout" | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Install dependencies" | ||
run: npm ci | ||
|
||
- name: "Rebuild the index.js file" | ||
run: npm run build | ||
|
||
- name: "Format check" | ||
run: npm run format-check | ||
|
||
- name: "Lint check" | ||
run: npm run lint | ||
|
||
- name: "Package" | ||
run: npm run package | ||
|
||
- name: "Test package" | ||
run: npm test | ||
|
||
- name: "Verify changes" | ||
id: diff | ||
run: | | ||
if [ "$(git diff --diff-algorithm=minimal --ignore-cr-at-eol --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | ||
echo "::warning::Detected uncommitted changes after build." | ||
echo "::warning::Remember to run 'npm run all' to update 'dist/index.js' and include it in the commit." | ||
git status | ||
git diff --diff-algorithm=minimal --ignore-cr-at-eol --ignore-space-at-eol --exit-code | ||
else | ||
echo "No changes detected" | ||
fi | ||
- name: "Upload dist if failure" | ||
uses: actions/upload-artifact@v3 | ||
if: failure() && steps.diff.conclusion == 'failure' | ||
with: | ||
name: dist | ||
path: dist/ | ||
test: | ||
name: "Test" | ||
strategy: | ||
matrix: | ||
runs-on: ["ubuntu-latest", "macos-latest", "windows-latest"] | ||
runs-on: ${{ matrix.runs-on }} | ||
steps: | ||
- name: "Checkout" | ||
if: vars.TEST_GITHUB_APP_ID != '' | ||
uses: actions/checkout@v3 | ||
|
||
- name: "Generate token" | ||
id: generate_token | ||
if: vars.TEST_GITHUB_APP_ID != '' | ||
uses: ./ | ||
with: | ||
app_id: ${{ vars.TEST_GITHUB_APP_ID }} | ||
private_key: ${{ secrets.TEST_GITHUB_APP_PRIVATE_KEY }} | ||
|
||
- name: "Check token length" | ||
if: steps.generate_token.outcome != 'skipped' | ||
run: node --eval "assert('${{ steps.generate_token.outputs.token }}'.length > 0);" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
__test__/_temp | ||
_temp/ | ||
lib/ | ||
.vscode/ | ||
node_modules/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
dist/ | ||
lib/ | ||
node_modules/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"bracketSpacing": false, | ||
"arrowParens": "avoid", | ||
"parser": "typescript" | ||
} |
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @reijoh @DamianFlynn |
Oops, something went wrong.