Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
aed3d9f
docs: investigate and recommend improved release process
claude Nov 12, 2025
27cd7b0
docs: add comprehensive release automation research plan
claude Nov 14, 2025
1de180a
docs: add AI changelog generation research
claude Nov 15, 2025
8d98ec9
docs: add validation spikes for AI changelog approach
claude Nov 15, 2025
59e48f8
docs: complete spike 1 - Gemini quality validation
claude Nov 15, 2025
25843b6
test: add spike 2 - GitHub Actions permissions test
claude Nov 15, 2025
fc5d299
feat: implement AI-powered changelog automation system
claude Nov 15, 2025
089f02c
Update RELEASE_PROCESS_INVESTIGATION.md
IsmaelMartinez Nov 15, 2025
9959e1b
Update RELEASE_AUTOMATION_RESEARCH_PLAN.md
IsmaelMartinez Nov 15, 2025
0f6e2ef
fix: resolve security vulnerabilities and improve workflow efficiency
claude Nov 15, 2025
1178e88
chore: add changelog entry for PR #1951
github-actions[bot] Nov 15, 2025
20f7f71
Review and implement enable-features fix for issue #1930 (#1932)
IsmaelMartinez Nov 12, 2025
8b7e357
Enable binary distribution for pull requests (#1942)
IsmaelMartinez Nov 12, 2025
a681ee6
[Docs]: Add MQTT documentation (#1939)
IsmaelMartinez Nov 12, 2025
2702f59
[Research]: architecture modernization approaches (#1936)
IsmaelMartinez Nov 12, 2025
7c2d34f
chore(deps-dev): bump js-yaml (#1950)
dependabot[bot] Nov 15, 2025
4dd420b
Push artifacts into pull requests (#1952)
IsmaelMartinez Nov 15, 2025
cd3cb6e
Week/Phase 1 of the incremental refactoring plan. (#1955)
IsmaelMartinez Nov 16, 2025
872bb81
Review Different AI Instructions (#1953)
IsmaelMartinez Nov 16, 2025
2eca1f2
fix: use safe PATH in release-prepare script
claude Nov 16, 2025
40c3cb7
docs: add comprehensive Release PR workflow plan
claude Nov 16, 2025
76173bc
fix: resolve PATH security issue and broken doc link
claude Nov 16, 2025
cbc8857
fix: completely isolate PATH environment for npm install
claude Nov 16, 2025
5f77bff
chore: remove outdated research docs from repo root
claude Nov 16, 2025
afb361d
docs: add manual release process guide and mark automation as future
claude Nov 17, 2025
fc17e1d
docs: add simple changelog plan focusing on manual flow first
claude Nov 17, 2025
d8860a5
docs: add Gemini API key setup and troubleshooting guide
claude Nov 17, 2025
23baae5
docs: add Gemini API key setup documentation
claude Nov 17, 2025
c1cd32e
chore: add changelog entry for PR #1951
github-actions[bot] Nov 17, 2025
e826559
chore: remove test commit permissions workflow
claude Nov 17, 2025
ee9758f
Merge remote-tracking branch 'origin/main' into claude/investigate-re…
claude Nov 17, 2025
db20e4e
fix: use hardcoded PATH constant to satisfy SonarQube security check
claude Nov 17, 2025
70b3fdf
chore: remove validation spikes document - spikes completed successfully
claude Nov 17, 2025
4fc5fd7
docs: consolidate changelog research into ADR 005
claude Nov 17, 2025
31aa109
fix: update release workflow to push to release branch instead of main
claude Nov 17, 2025
5a3775f
docs: remove redundant security analysis section from ADR 005
claude Nov 17, 2025
cdeece3
security: use commit hashes for GitHub Actions instead of version tags
claude Nov 17, 2025
6e1c56b
refactor: remove unnecessary manual changelog script
claude Nov 17, 2025
c9dc8ff
docs: simplify release documentation and fix duplication
claude Nov 17, 2025
c850993
docs: update task execution instructions for new changelog system
claude Nov 17, 2025
504d23f
refactor: address SonarQube code quality issues
claude Nov 17, 2025
36f8ba1
refactor: convert release-prepare to ESM with top-level await
claude Nov 17, 2025
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
77 changes: 77 additions & 0 deletions .changelog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Changelog Entries

This directory stores pending changelog entries for the next release.

## Setup (One-Time)

### Configure Gemini API Key

The automatic changelog generation uses Google's Gemini AI. You need to add the API key to GitHub Secrets:

**Steps:**
1. Go to https://aistudio.google.com/
2. Click "Get API key" (free tier available)
3. Create a new API key or use existing one
4. Copy the key
5. In your GitHub repo: **Settings** → **Secrets and variables** → **Actions**
6. Click **New repository secret**
7. Name: `GEMINI_API_KEY`
8. Value: Paste your API key
9. Click **Add secret**

**Note:** The free tier includes 1,500 requests per day, which is more than enough for changelog generation.

## How It Works

### Automatic (via AI)
When you open or update a PR, a GitHub Action automatically:
1. Uses Gemini AI to generate a one-line summary
2. Creates a file: `.changelog/pr-XXXX.txt`
3. Commits it to the PR branch
4. Comments on the PR with the generated entry

### Manual (if needed)
If you want to add or edit a changelog entry manually:

```bash
# Just create a .txt file in .changelog/ directory
echo "Your changelog description - by @username (#PR)" > .changelog/manual-$(date +%s).txt
```

## Release Process

When ready to release:

```bash
npm run release:prepare
```

This script will:
1. Read all `.changelog/*.txt` files
2. Generate `appdata.xml` release entry
3. Prompt for version bump (patch/minor/major)
4. Update `package.json`, `package-lock.json`, `appdata.xml`
5. Delete consumed changelog files
6. Show you what to commit

Then just:
```bash
git add .
git commit -m "chore: release vX.Y.Z"
git push origin main
```

The version change triggers the build workflow automatically.

## File Format

Each file contains one line:
```
Add MQTT integration for Teams status publishing - by @username (#1234)
```

Simple plain text, nothing fancy.

## Editing Entries

AI-generated entries are good but not perfect. Feel free to edit any `.changelog/*.txt` file before running `release:prepare`.
1 change: 1 addition & 0 deletions .changelog/pr-1951.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add AI-powered changelog system to decouple merging from releasing - by @IsmaelMartinez (#1951)
17 changes: 6 additions & 11 deletions .github/instructions/process-tasks-list.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,9 @@ Guidelines for managing task lists in markdown files to track progress on comple
- **Push**: Push changes to remote repository (`git push origin <branch-name>`)
- **Create Pull Request**: After pushing changes and completing the parent task:
- Create a Pull Request/Merge Request to the main branch
- Follow version management guidelines from `RELEASE_INFO.md`:
- Update version in `package.json` if this is a feature/fix release
- Run `npm install` to update `package-lock.json`
- Add new `<release>` entry in `com.github.IsmaelMartinez.teams_for_linux.appdata.xml` with:
- Updated version number
- Current date
- Description of changes made
- Commit version updates with message format: `chore: bump version to X.Y.Z`
- **Do NOT update versions in regular PRs** - the changelog system handles this
- The PR will automatically get a `.changelog/pr-XXX.txt` file with an AI-generated summary
- See `docs-site/docs/development/manual-release-process.md` for the release process
- Include clear PR description summarizing completed tasks and changes
- Reference the original PRD and task list in PR description

Expand Down Expand Up @@ -90,8 +85,8 @@ When working with task lists, the AI must:
- Developer instructions in `.github/copilot-instructions.md`
- Configuration documentation for new settings or patterns
- API documentation for new IPC channels or interfaces
8. **Version Management and PR Creation**: When all tasks are complete:
- Follow versioning guidelines from `RELEASE_INFO.md`
- Update `package.json`, `package-lock.json`, and `com.github.IsmaelMartinez.teams_for_linux.appdata.xml`
8. **PR Creation**: When all tasks are complete:
- **Do NOT update versions** - the changelog system handles releases separately
- Create comprehensive Pull Request with clear description of completed work
- Reference original PRD and summarize implementation approach
- The PR will automatically get a `.changelog/pr-XXX.txt` file for the future release
137 changes: 137 additions & 0 deletions .github/workflows/changelog-generator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: Generate Changelog Entry

on:
pull_request:
types: [opened, synchronize]
branches: [main]

jobs:
generate-changelog:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Check if changelog already exists
id: check
run: |
if [ -f ".changelog/pr-${{ github.event.pull_request.number }}.txt" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi

- name: Generate summary with Gemini
if: steps.check.outputs.exists == 'false'
id: gemini
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
with:
script: |
const prTitle = context.payload.pull_request.title;
const prBody = context.payload.pull_request.body || '';

// Truncate body safely (first 1000 chars)
const cleanBody = prBody.substring(0, 1000).replace(/"/g, "'");

const prompt = `Summarize this PR in ONE concise line suitable for a changelog (max 80 chars):

Title: ${prTitle}

Description: ${cleanBody}

Guidelines:
- Start with action verb (Add/Fix/Update/Remove)
- Focus on user-facing impact
- Max 80 characters
- Professional tone

Example: "Add MQTT integration for Teams status publishing"`;

try {
const response = await fetch(
`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp:generateContent?key=${process.env.GEMINI_API_KEY}`,
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
contents: [{ parts: [{ text: prompt }] }],
generationConfig: {
temperature: 0.3,
maxOutputTokens: 50
}
})
}
);

const data = await response.json();
const summary = data.candidates[0].content.parts[0].text.trim();

core.setOutput('summary', summary);
console.log(`Generated: ${summary}`);
} catch (error) {
console.log(`Gemini API failed, using PR title as fallback`);
core.setOutput('summary', prTitle);
}

- name: Post-process summary
if: steps.check.outputs.exists == 'false'
id: final
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
let summary = `${{ steps.gemini.outputs.summary }}`;
const author = context.payload.pull_request.user.login;
const prNum = context.payload.pull_request.number;

// Add author if not a bot
if (!author.includes('bot')) {
summary = `${summary} - by @${author}`;
}

// Add PR number
summary = `${summary} (#${prNum})`;

core.setOutput('final_summary', summary);
console.log(`Final: ${summary}`);

- name: Save changelog entry
if: steps.check.outputs.exists == 'false'
run: |
mkdir -p .changelog
echo "${{ steps.final.outputs.final_summary }}" > .changelog/pr-${{ github.event.pull_request.number }}.txt

echo "✅ Created: .changelog/pr-${{ github.event.pull_request.number }}.txt"
cat .changelog/pr-${{ github.event.pull_request.number }}.txt

- name: Commit changelog file to PR branch
if: steps.check.outputs.exists == 'false'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

git add .changelog/
git commit -m "chore: add changelog entry for PR #${{ github.event.pull_request.number }}"
git push

echo "✅ Changelog entry committed to PR branch"

- name: Comment on PR
if: steps.check.outputs.exists == 'false'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `✅ Changelog entry generated and committed to this PR:\n\n\`\`\`\n${{ steps.final.outputs.final_summary }}\n\`\`\`\n\nThe file \`.changelog/pr-${{ github.event.pull_request.number }}.txt\` will be included when you merge this PR.\n\nYou can edit it directly in this PR if needed.`
})
Loading
Loading