-
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
35 changed files
with
6,862 additions
and
0 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 @@ | ||
/node_modules/ | ||
/dist/ | ||
/Dockerfile |
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,2 @@ | ||
/dist/ | ||
/crates/*/pkg |
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,18 @@ | ||
env: | ||
es2021: true | ||
browser: false | ||
node: true | ||
extends: | ||
- eslint-config-love | ||
- eslint:recommended | ||
- plugin:@typescript-eslint/eslint-recommended | ||
- prettier | ||
overrides: [] | ||
parserOptions: | ||
project: ["./tsconfig.json"] | ||
ecmaVersion: latest | ||
sourceType: module | ||
rules: | ||
"@typescript-eslint/consistent-type-definitions": off | ||
"@typescript-eslint/explicit-function-return-type": off | ||
"@typescript-eslint/no-non-null-assertion": off |
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,19 @@ | ||
name: reviewdog / actionlint | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- ".github/workflows/**" | ||
|
||
jobs: | ||
actionlint: | ||
name: actionlint with reviewdog | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: actionlint | ||
uses: reviewdog/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
reporter: github-pr-review |
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: lint and test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Lint ESLint | ||
run: yarn lint:eslint | ||
|
||
- name: Lint Prettier | ||
run: yarn lint:prettier | ||
|
||
- name: TypeCheck | ||
run: yarn typecheck | ||
|
||
- name: Test | ||
run: yarn test |
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,7 @@ | ||
/node_modules/ | ||
.DS_Store | ||
/dist/ | ||
/dist-ssr/ | ||
*.local | ||
|
||
.env |
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,6 @@ | ||
/dist/ | ||
/node_modules/ | ||
/deploy/ | ||
/crates/*/pkg | ||
/crates/*/target | ||
src/configFormat/json.js |
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 @@ | ||
{} |
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 @@ | ||
FROM node:20-bullseye-slim | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json yarn.lock ./ | ||
RUN yarn install | ||
|
||
COPY ./ ./ | ||
RUN yarn build | ||
|
||
CMD ["npm", "start"] |
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,77 @@ | ||
# autoproject | ||
|
||
自動で Issue を Project に登録する | ||
|
||
## config | ||
|
||
サンプル:[test/readme_rule.yaml](/test/readme_rule.yaml) | ||
|
||
スキーマは,typescript 的に次と同じ(型名は実際のものと異なる) | ||
|
||
```ts | ||
type RulesYaml = (Partial<Payload> & { project: Project })[]; | ||
|
||
type Project = | ||
| number | ||
| { | ||
not: number | number[]; | ||
} | ||
| Array< | ||
| number | ||
| { | ||
not: number | number[]; | ||
} | ||
> | ||
| { | ||
only: number | number[]; | ||
} | ||
| { | ||
reject: {}; | ||
}; | ||
|
||
type Payload = { | ||
repo: Partial<Repo>; | ||
issue: Partial<Issue>; | ||
pr: Partial<PullRequest>; | ||
on: Partial<EventTarget>; | ||
}; | ||
|
||
type Repo = { | ||
name: string | string[]; | ||
full_name: string | string[]; | ||
description: string | string[]; | ||
fork: boolean; | ||
private: boolean; | ||
topics: string | string[]; | ||
}; | ||
|
||
type Issue = { | ||
assignees: string | string[]; | ||
labels: string | string[]; | ||
}; | ||
|
||
type PullRequest = { | ||
reviewers: string | string[]; | ||
assignees: string | string[]; | ||
labels: string | string[]; | ||
head: { | ||
label: string | string[]; | ||
ref: string | string[]; | ||
}; | ||
}; | ||
|
||
type EventTarget = { | ||
issue: | ||
| "any" | ||
| "opened" | ||
| "assigned" | ||
| "labeled" | ||
| ("opened" | "assigned" | "labeled")[]; | ||
pr: | ||
| "any" | ||
| "opened" | ||
| "assigned" | ||
| "labeled" | ||
| ("opened" | "assigned" | "labeled")[]; | ||
}; | ||
``` |
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,53 @@ | ||
{ | ||
"name": "autoproject", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"autopjlint": "node dist/lint.js", | ||
"start": "node dist/index.js", | ||
"compileNearley": "echo '/* eslint-disable */' > src/configFormat/json.js && nearleyc src/configFormat/json.ne >> src/configFormat/json.js", | ||
"build": "tsc", | ||
"test": "vitest run", | ||
"typecheck": "tsc --noEmit", | ||
"lint:prettier": "prettier . --check", | ||
"lint:eslint": "eslint . --format stylish", | ||
"lint": "run-p lint:*", | ||
"fix:prettier": "yarn lint:prettier --write", | ||
"fix:eslint": "yarn lint:eslint --fix", | ||
"fix": "run-s fix:prettier fix:eslint" | ||
}, | ||
"dependencies": { | ||
"@octokit/app": "14.0.2", | ||
"@octokit/graphql-schema": "15.3.0", | ||
"@prantlf/jsonlint": "14.0.3", | ||
"dotenv": "16.4.5", | ||
"fuse.js": "6.6.2", | ||
"log4js": "6.9.1", | ||
"mitt": "3.0.1", | ||
"nearley": "2.20.1", | ||
"yaml": "2.3.4", | ||
"yargs": "17.7.2", | ||
"zod": "3.22.4" | ||
}, | ||
"devDependencies": { | ||
"@octokit/types": "12.6.0", | ||
"@tsconfig/node20": "20.1.4", | ||
"@types/nearley": "2.11.5", | ||
"@types/node": "20.11.30", | ||
"@types/yargs": "17.0.32", | ||
"@typescript-eslint/eslint-plugin": "6.4.0", | ||
"@typescript-eslint/parser": "6.4.0", | ||
"eslint": "8.57.0", | ||
"eslint-config-love": "43.1.0", | ||
"eslint-config-prettier": "8.10.0", | ||
"eslint-plugin-import": "2.29.1", | ||
"eslint-plugin-n": "15.7.0", | ||
"eslint-plugin-prettier": "4.2.1", | ||
"eslint-plugin-promise": "6.1.1", | ||
"npm-run-all": "4.1.5", | ||
"prettier": "2.8.8", | ||
"ts-node": "10.9.2", | ||
"typescript": "5.3.3", | ||
"vitest": "1.4.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,10 @@ | ||
{ | ||
"extends": ["config:base"], | ||
"packageRules": [ | ||
{ | ||
"updateTypes": ["minor", "patch"], | ||
"automerge": true | ||
} | ||
], | ||
"postUpdateOptions": ["yarnDedupeHighest"] | ||
} |
Oops, something went wrong.