Skip to content

Commit

Permalink
chore: update files
Browse files Browse the repository at this point in the history
  • Loading branch information
haru52 committed May 16, 2024
1 parent 9adad91 commit 3766ae6
Show file tree
Hide file tree
Showing 7 changed files with 260 additions and 5 deletions.
49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/general-issue-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
name: 一般 issue(ベータ)
description: 一般用途用の issue(ベータ)。
labels: []
body:
- type: textarea
id: deadline
attributes:
label: 期限
description: この issue はいつまでに完了すべきですか?また、それはなぜですか?
placeholder: 例:yyyy-MM-dd
- type: textarea
id: requirements
attributes:
label: 開始要件
description: この issue の開始には何が必要ですか?
placeholder: |
以下の全 issues の解決。
- #1
- #2
- type: textarea
id: tasks
attributes:
label: タスク
description: この issue を構成するタスクは何ですか?
placeholder: |
- [ ] タスク A
- [ ] タスク B
- type: textarea
id: goal
attributes:
label: 完了条件
description: この issue の完了条件は何ですか?
placeholder: 全タスクの完了。
value: 全タスクの完了。
- type: textarea
id: description
attributes:
label: 詳細
description: この issue についての詳細を入力してください。
- type: textarea
id: references
attributes:
label: 参考
description: この issue についての参考情報を入力してください。
placeholder: |
- [参考ページ A](https://example.com/)
- #3
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/general-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: 一般 issue
about: 一般用途用の issue。
title: ''
labels: ''
assignees: ''

---

## 期限

<!-- 例: yyyy-MM-dd -->

## 開始要件

<!--
例:
以下の全 issues の解決。
- #1
- #2
-->

## タスク

<!--
例:
- [ ] タスク A
- [ ] タスク B
-->

## 完了条件

全タスクの完了。

## 詳細

## 参考

<!--
例:
- [参考ページ A](https://example.com/)
- #3
-->
33 changes: 33 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- markdownlint-disable MD041 -->

## Linked issues

<!--
例:
- Resolve #1
- Fix #2
-->

## 期限

<!--
例:
yyyy-MM-dd
または、
linked issues 参照。
-->

## 詳細

## 参考

<!--
例:
- [参考ページ A](https://example.com/)
- #3
-->
16 changes: 16 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: "Lint: PR title"
"on":
pull_request_target:
types:
- opened
- edited
- synchronize
jobs:
lint-pr-title:
name: "Lint: PR title"
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: reviewdog
"on": pull_request
jobs:
reviewdog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- name: markdownlint
uses: reviewdog/action-markdownlint@v0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-review
markdownlint_flags: . .?*/**/*.{md,markdown}
- name: textlint
uses: tsuyoshicho/action-textlint@v3
with:
textlint_flags: . .?*/**
- name: yamllint
uses: reviewdog/action-yamllint@v1
with:
reporter: github-pr-review
- name: ShellCheck
uses: reviewdog/action-shellcheck@v1
with:
reporter: github-pr-review
pattern: |
*.sh
commit-msg
pre-commit
- name: actionlint
uses: reviewdog/action-actionlint@v1
with:
reporter: github-pr-review
73 changes: 73 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
name: Test
"on":
push:
branches: main
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: npm
- run: npm ci
- name: "Lint: credentials"
run: npx secretlint "**/*"
- name: "Lint: npm"
run: npm run lint
- name: "Lint: Git commit message"
# Dependabot によるコミットの場合、commitlint の実行をスキップする。
# 理由:Dependabot によるコミットメッセージ 1 行の長さが 100 文字を
# 超えることがあるため。
if: github.actor != 'dependabot[bot]'
uses: wagoid/commitlint-github-action@v5
with:
configFile: .commitlintrc.yml
- name: "Lint: YAML"
uses: karancode/yamllint-github-action@v2.1.1
with:
yamllint_strict: true
- name: "Lint: shell script"
uses: ludeeus/action-shellcheck@master
with:
ignore_paths: .husky/_ node_modules
- name: "Lint: GitHub Actions workflow"
# yamllint disable rule:line-length
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
./actionlint -color
# yamllint enable rule:line-length
shell: bash
# yamllint disable rule:comments-indentation
# 当リポジトリが npm プロジェクトであり、かつ、package.json に build または
# test script がある場合、以下のジョブをアンコメントしてください。
# build:
# name: Build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version-file: .node-version
# cache: npm
# - run: npm ci
# - run: npm run build
# test:
# name: Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version-file: .node-version
# cache: npm
# - run: npm ci
# - run: npm test
# yamllint enable rule:comments-indentation
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
.PHONY: dev-install lint lint-npm lint-yml lint-sh lint-action update-gi
.PHONY: dev-install lint lint-npm lint-yml lint-action update-gi

dev-install:
git submodule update --init --recursive
npm ci

lint: lint-npm lint-yml lint-sh lint-action
lint: lint-npm lint-yml lint-action

lint-npm:
npm run lint

lint-yml:
yamllint --strict .

lint-sh:
shellcheck .husky/commit-msg .husky/pre-commit

lint-action:
actionlint

Expand Down

0 comments on commit 3766ae6

Please sign in to comment.