Skip to content

Commit

Permalink
🔧 ドキュメントと設定ファイルの更新およびワークフローの改善 (#39)
Browse files Browse the repository at this point in the history
* 🔧 ワークフローに同時実行制御を追加し、進行中のジョブをキャンセルする設定を適用

* 🔧 .pre-commit-config.yamlのフォーマットを修正

* 🔧 .prettierrcのprintWidthを80から120に変更

* 🔧 README.mdとREADME.ja.mdでOpenAI APIキーの名前を修正

* 🔧 README.mdとREADME.ja.mdでopenai-generate-pr-descriptionをv1.0.3に更新

* 🔧 README.mdとREADME.ja.mdにオプションのOpenAIモデル設定を追加

* 🔧 README.mdとREADME.ja.mdにコミットログ履歴の制限オプションを追加

* 🔧 README.mdとREADME.ja.mdにOpenAIモデルのデフォルト設定と料金に関する注意事項を追加

* 🔧 README.mdにオプションのOpenAIモデル設定を追加し、デフォルトモデルについての注意事項を明記
  • Loading branch information
tqer39 authored Nov 8, 2024
1 parent 33b72b2 commit 5e1f377
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
pull_request:
types: [opened, ready_for_review]

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
add-reviews:
permissions:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/generate-pr-description.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
- opened
- synchronize

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
generate-pr-description:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- main
pull_request:

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
pre-commit:
name: pre-commit
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/update-license-year.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- cron: '0 0 1 1 *' # 毎年1月1日に実行
workflow_dispatch:

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:
commit-changes:
runs-on: ubuntu-latest
Expand Down
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
# see https://pre-commit.com

default_language_version:
python: python3.13.0
python: python3.13.0

exclude: |
(?x)^(
Expand Down
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 80,
"printWidth": 120,
"tabWidth": 2
}
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
if: contains(fromJSON('["renovate[bot]"]'), github.event.pull_request.user.login) == false
steps:
- uses: actions/checkout@v4
- uses: tqer39/[email protected].2
- uses: tqer39/[email protected].3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
open-api-key: ${{ secrets.OPENAI_API_KEY }}
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
```
## Inputs
Expand All @@ -43,10 +43,26 @@ jobs:

**Required** GitHub token. Specify `${{ secrets.GITHUB_TOKEN }}`.

### `open-api-key`
### `openai-api-key`

**Required** OpenAI API key. Specify `${{ secrets.OPENAI_API_KEY }}`.

### `openai-model`

**Optional** OpenAI model to use. Default is `gpt-3.5-turbo`.

> [!NOTE]
>
> - 📝 The default model is `gpt-3.5-turbo` and can be used for free in the OpenAI API specification. If you use another model, you may incur charges for the OpenAI API.

### `commit-log-history-limit`

**Optional** Limit of commit log history. Default is `70`.

> [!NOTE]
>
> - 📝 Due to the limit of the number of tokens that can be used in one request in the OpenAI API specification, limiting the number of commit log histories can prevent request failures.

## Contribution

If you find any issues or have improvements, please create an Issue or submit a Pull Request.
Expand Down
22 changes: 19 additions & 3 deletions docs/README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
if: contains(fromJSON('["renovate[bot]"]'), github.event.pull_request.user.login) == false
steps:
- uses: actions/checkout@v4
- uses: tqer39/[email protected].2
- uses: tqer39/[email protected].3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
open-api-key: ${{ secrets.OPENAI_API_KEY }}
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
```
## Inputs
Expand All @@ -43,10 +43,26 @@ jobs:

**必須** GitHub トークン。`${{ secrets.GITHUB_TOKEN }}` を指定します。

### `open-api-key`
### `openai-api-key`

**必須** OpenAI API キー。`${{ secrets.OPENAI_API_KEY }}` を指定します。

### `openai-model`

**オプション** OpenAI モデル。デフォルトは `gpt-3.5-turbo` です。

> [!NOTE]
>
> - 📝 OpenAI API の仕様で、デフォルトのモデルは `gpt-3.5-turbo` で無料で使用できます。その他のモデルを使用する場合は、OpenAI API の料金が発生する可能性があります。

### `commit-log-history-limit`

**オプション** コミットログの履歴の制限。デフォルトは `70` です。

> [!NOTE]
>
> - 📝 OpenAI API の仕様で、1回のリクエストで使用可能なトークン数に制限があるため、コミットログの履歴の数を制限することで、リクエストの失敗を防ぐことができます。

## 貢献方法

問題や課題が発見されたら Issue を作成するか Pull Request を作成していただけると幸いです。
Expand Down

0 comments on commit 5e1f377

Please sign in to comment.