Skip to content

Commit

Permalink
Use Prettier for formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
arkon committed Feb 3, 2022
1 parent 8e7ea73 commit 237a719
Show file tree
Hide file tree
Showing 11 changed files with 284 additions and 217 deletions.
1 change: 1 addition & 0 deletions . prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
moderate:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v1
- name: Checkout repo
uses: actions/checkout@v1

- name: Moderate the issue
# uses: tachiyomiorg/issue-moderator-action@v1
uses: ./
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
duplicate-check-enabled: true
duplicate-check-label: enhancement
- name: Moderate the issue
# uses: tachiyomiorg/issue-moderator-action@v1
uses: ./
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
duplicate-check-enabled: true
duplicate-check-label: enhancement
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ jobs:
moderate:
runs-on: ubuntu-latest
steps:
- name: Moderate issues
uses: tachiyomiorg/issue-moderator-action@v1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Moderate issues
uses: tachiyomiorg/issue-moderator-action@v1.2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
```
## Inputs
| Name | Description | Default value |
| ---- | ----------- | ------------- |
| `repo-token` | GitHub token | |
| `duplicate-command` | Optional duplicate command text. | Duplicate of # |
| `edit-title-command` | Optional edit issue title command text. | Edit title to |
| `lock-command` | Optional lock command text. | Lock this issue |
| `duplicate-check-enabled` | Enable the duplicate URL finder if sets to `true`. | |
| `duplicate-check-label` | Label of the opened issues to check. | |
| Name | Description | Default value |
| ------------------------- | -------------------------------------------------- | --------------- |
| `repo-token` | GitHub token | |
| `duplicate-command` | Optional duplicate command text. | Duplicate of # |
| `edit-title-command` | Optional edit issue title command text. | Edit title to |
| `lock-command` | Optional lock command text. | Lock this issue |
| `duplicate-check-enabled` | Enable the duplicate URL finder if sets to `true`. | |
| `duplicate-check-label` | Label of the opened issues to check. | |

## Commands

Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
description: Command to lock an issue
duplicate-command:
required: false
default: "Duplicate of #"
default: 'Duplicate of #'
description: Command to close a duplicate issue
duplicate-check-enabled:
required: false
Expand All @@ -32,4 +32,4 @@ inputs:
It's required if you enabled the duplicate finder.
runs:
using: node12
main: dist/index.js
main: dist/index.js
11 changes: 5 additions & 6 deletions dist/index.js

Large diffs are not rendered by default.

45 changes: 44 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "GitHub action to moderate issues",
"main": "dist/index.js",
"scripts": {
"build": "ncc build src/main.ts --minify"
"format": "prettier --write .",
"build": "ncc build src/main.ts --minify",
"prepare": "npm run format && npm run build"
},
"repository": {
"type": "git",
Expand All @@ -15,6 +17,7 @@
"@types/dedent": "^0.7.0",
"@types/node": "^17.0.14",
"@vercel/ncc": "^0.33.1",
"prettier": "2.5.1",
"typescript": "^4.5.5"
},
"dependencies": {
Expand Down
Loading

0 comments on commit 237a719

Please sign in to comment.