Skip to content

Commit ae71192

Browse files
committed
ci(workflows): add generate-commit-message.yml for automated commit message generation using OpenCommit
refactor(workflows): rename PR description workflow for consistency with naming conventions
1 parent b115d33 commit ae71192

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: 'Commit Message Update Action'
2+
3+
on:
4+
push:
5+
# this list of branches is often enough,
6+
# but you may still ignore other public branches
7+
branches-ignore: [main master dev development release]
8+
9+
jobs:
10+
opencommit:
11+
timeout-minutes: 10
12+
name: OpenCommit
13+
runs-on: ubuntu-latest
14+
permissions: write-all
15+
steps:
16+
- name: Setup Node.js Environment
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '16'
20+
- uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
23+
- uses: di-sukharev/opencommit@github-action-v1.0.4
24+
with:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
27+
env:
28+
# set openAI api key in repo actions secrets,
29+
# for openAI keys go to: https://platform.openai.com/account/api-keys
30+
# for repo secret go to: <your_repo_url>/settings/secrets/actions
31+
OCO_OPENAI_API_KEY: ${{ secrets.OCO_API_KEY }}
32+
33+
# customization
34+
OCO_TOKENS_MAX_INPUT: 4096
35+
OCO_TOKENS_MAX_OUTPUT: 500
36+
OCO_OPENAI_BASE_PATH: ''
37+
OCO_DESCRIPTION: false
38+
OCO_EMOJI: false
39+
OCO_MODEL: gpt-4o
40+
OCO_LANGUAGE: en
41+
OCO_PROMPT_MODULE: conventional-commit

.github/workflows/generate-pr-description.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Autofill PR description
1+
name: PR description Update Action
22

33
on:
44
pull_request:

0 commit comments

Comments
 (0)