Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 24 additions & 9 deletions .github/workflows/auto-changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,32 @@ jobs:
token: ${{ steps.app-token.outputs.token }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Check if last commit was by bot
id: bot-check
run: |
LAST_COMMIT_AUTHOR=$(git log -1 --format='%an')
if [ "$LAST_COMMIT_AUTHOR" = "github-actions[bot]" ]; then
echo "skip=true" >> $GITHUB_OUTPUT
echo "Last commit was by bot, skipping workflow"
else
echo "skip=false" >> $GITHUB_OUTPUT
fi

- name: Ensure jq is available
if: steps.bot-check.outputs.skip != 'true'
run: |
sudo apt-get update -y
sudo apt-get install -y jq

- name: Set base/head SHAs
if: steps.bot-check.outputs.skip != 'true'
id: shas
run: |
echo "base=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT
echo "head=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT

- name: Detect user-provided CHANGELOG version
if: steps.bot-check.outputs.skip != 'true'
id: changelog
run: |
set -euo pipefail
Expand All @@ -67,6 +81,7 @@ jobs:
fi

- name: Compute next version and update package.json
if: steps.bot-check.outputs.skip != 'true'
id: version
run: |
set -euo pipefail
Expand Down Expand Up @@ -112,7 +127,7 @@ jobs:
echo "should_generate_changelog=$SHOULD_GENERATE" >> $GITHUB_OUTPUT

- name: Collect PR commits metadata
if: steps.version.outputs.should_generate_changelog == 'true'
if: steps.bot-check.outputs.skip != 'true' && steps.version.outputs.should_generate_changelog == 'true'
id: commits
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
Expand All @@ -128,7 +143,7 @@ jobs:
echo "count=$(jq 'length' commits_compact.json)" >> $GITHUB_OUTPUT

- name: Collect PR files (overview)
if: steps.version.outputs.should_generate_changelog == 'true'
if: steps.bot-check.outputs.skip != 'true' && steps.version.outputs.should_generate_changelog == 'true'
id: files
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
Expand All @@ -139,7 +154,7 @@ jobs:
jq '[.[] | {filename, status, additions, deletions, changes, patch: ((.patch//"") | split("\n")[0:40] | join("\n") | .[:4000])}]' files.json > files_compact.json

- name: Prepare model input
if: steps.version.outputs.should_generate_changelog == 'true'
if: steps.bot-check.outputs.skip != 'true' && steps.version.outputs.should_generate_changelog == 'true'
run: |
set -euo pipefail
VERSION="${{ steps.version.outputs.new_version }}"
Expand All @@ -154,7 +169,7 @@ jobs:
'{version:$version,date:$date,pr:{title:$pr_title,url:$pr_url},commits:$commits[0],files:$files[0]}' > model_context.json

- name: Generate categorized changelog via OpenAI
if: steps.version.outputs.should_generate_changelog == 'true'
if: steps.bot-check.outputs.skip != 'true' && steps.version.outputs.should_generate_changelog == 'true'
id: ai
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
Expand All @@ -175,12 +190,11 @@ jobs:
CONTEXT=$(cat model_context.json)
# Build OpenAI Chat Completions payload
jq -n \
--arg model "gpt-4.1" \
--arg model "gpt-5" \
--arg system "$INSTRUCTIONS" \
--arg user "$CONTEXT" \
--argjson temperature 0.2 \
--argjson max_tokens 800 \
'{model:$model, response_format:{type:"json_object"}, messages:[{role:"system", content:$system},{role:"user", content:$user}], temperature:$temperature, max_tokens:$max_tokens}' > payload.json
--argjson max_completion_tokens 4000 \
'{model:$model, response_format:{type:"json_object"}, messages:[{role:"system", content:$system},{role:"user", content:$user}], max_completion_tokens:$max_completion_tokens}' > payload.json
# Call OpenAI Chat Completions API
http_status=$(curl -sS -o response.json -w "%{http_code}" \
-X POST "https://api.openai.com/v1/chat/completions" \
Expand Down Expand Up @@ -208,7 +222,7 @@ jobs:
jq . changelog.json > /dev/null

- name: Render CHANGELOG entry and update file
if: steps.version.outputs.should_generate_changelog == 'true'
if: steps.bot-check.outputs.skip != 'true' && steps.version.outputs.should_generate_changelog == 'true'
run: |
set -euo pipefail
VERSION="${{ steps.version.outputs.new_version }}"
Expand Down Expand Up @@ -250,6 +264,7 @@ jobs:
cat "$md" "$existing" > "$tmp" && mv "$tmp" CHANGELOG.md

- name: Commit and push changes to PR branch
if: steps.bot-check.outputs.skip != 'true'
env:
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## [0.1.26] - 2025-10-31

### PR: [dev to main: update apple icon and workflows ](https://github.com/openchatui/openchat/pull/91)

### Added
- Add Apple touch icon and general icon assets to improve branding and PWA support. (https://github.com/openchatui/openchat/commit/55a0f0c4f19bcf41e9d9af321e1e32d5589803d0)

### Changed
- Auto-changelog workflow now skips when the last commit is by the bot, and its model input generation switched to GPT-5. (https://github.com/openchatui/openchat/commit/0cd77def9d2c0a1102430f5f7de3bb35d59523d5)
- Updated auto-changelog to use max_completion_tokens instead of the deprecated max_tokens parameter. (https://github.com/openchatui/openchat/commit/304c6ce8c3b1cc432b2a299f1c4b58beec30ea05)
- Removed the temperature parameter from the auto-changelog workflow payload to simplify requests. (https://github.com/openchatui/openchat/commit/1a561da6fd08c10c28bc19609eb418b72eccc623)
- Increased max_completion_tokens in the auto-changelog workflow to 4000 to support larger outputs. (https://github.com/openchatui/openchat/commit/fa6949835656af4810fbb58db6c0da078a208bf2)

## [0.1.25] - 2025-10-31

### PR: [Dev to Main: Reverse Proxy and Auth Fixes](https://github.com/openchatui/openchat/pull/86)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openchatui",
"version": "0.1.25",
"version": "0.1.26",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
Expand Down
Binary file added public/apple-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.