Skip to content

Commit c92df2b

Browse files
authored
Merge branch 'master' into feat/trezor-hardware-support
2 parents 48972c1 + 3a2adae commit c92df2b

8 files changed

Lines changed: 77 additions & 2 deletions

File tree

.claude/commands/pr.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,13 @@ gh pr create --base $base --title "..." --body "..." [--draft]
186186
- Instruct the user to drag-and-drop each media file into the Preview section via the GitHub web UI
187187
- Note: GitHub does not support programmatic media upload to PR bodies
188188

189+
### 8b. Backfill Changelog PR Number
190+
191+
If the PR was created (not dry run) and `CHANGELOG.md` was modified in the branch (`git diff $base...HEAD --name-only | grep CHANGELOG.md`):
192+
- Read `CHANGELOG.md` and scan `## [Unreleased]` entries for lines missing a `#NUMBER` suffix
193+
- Append the actual PR number to those entries, e.g. `- Add foo` becomes `- Add foo #123`
194+
- If any entries were updated, create a new commit with message `chore: backfill changelog pr number` and push
195+
189196
### 9. Output Summary
190197

191198
**If PR created:**

.claude/commands/release.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@ If "Previous tag": ask `"Which tag?"` with a text input (default: `v{oldVersionN
5353

5454
If "master" or if the release is minor/major: `{baseRef} = master`.
5555

56+
### 2c. Finalize Changelog
57+
58+
Read `CHANGELOG.md` and check whether `## [Unreleased]` has any entries beneath it.
59+
60+
**If entries exist:**
61+
1. Replace `## [Unreleased]` with `## [{newVersionName}] - {YYYY-MM-DD}` (today's date)
62+
2. Insert a fresh empty `## [Unreleased]` section above the new version heading
63+
3. Update the compare link references at the bottom of the file:
64+
- Change `[Unreleased]` link to compare from `v{newVersionName}...HEAD`
65+
- Add a new `[{newVersionName}]` link comparing `v{oldVersionName}...v{newVersionName}`
66+
67+
**If no entries:** Print `⚠ CHANGELOG.md has no unreleased entries — continuing without changelog update.` and proceed.
68+
5669
### 3. Create Release Branch & Bump Version
5770

5871
```bash
@@ -79,10 +92,13 @@ Edit `app/build.gradle.kts`:
7992

8093
```bash
8194
git add app/build.gradle.kts
95+
# Only stage CHANGELOG.md if step 2c modified it (i.e. unreleased entries were found)
8296
git commit -m "chore: version {newVersionName}"
8397
git push -u origin release-{newVersionName}
8498
```
8599

100+
If step 2c updated `CHANGELOG.md`, also `git add CHANGELOG.md` before the commit.
101+
86102
### 4. Create Version Bump PR
87103

88104
Read `.github/pull_request_template.md` for structure. Create PR:
@@ -131,13 +147,13 @@ gh release create v{newVersionName} \
131147

132148
### 6. Generate Store Release Notes
133149

134-
Fetch the auto-generated release notes from the draft release:
150+
Read the `## [{newVersionName}]` section from `CHANGELOG.md` as the primary source for release content. If that section is empty or was not created in Step 2c, fall back to fetching auto-generated release notes:
135151

136152
```bash
137153
gh release view v{newVersionName} --json body --jq .body
138154
```
139155

140-
Using those notes as context, write a concise user-facing summary of the release (2-3 sentences max, no commit hashes or PR numbers, written for end users not developers). Focus on new features and important bug fixes. Omit chores, maintenance, refactoring, CI changes, and test coverage improvements — these are not relevant to Play Store users. Translate the summary into 5 languages.
156+
Using the changelog entries (or auto-generated notes as fallback) as context, write a concise user-facing summary of the release (2-3 sentences max, no commit hashes or PR numbers, written for end users not developers). Focus on new features and important bug fixes. Omit chores, maintenance, refactoring, CI changes, and test coverage improvements — these are not relevant to Play Store users. Translate the summary into 5 languages.
141157

142158
Create `.ai/` directory if it doesn't exist. Save to `.ai/release-notes-{newVersionName}.md`:
143159

.cursor/rules/rules.main.mdc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ alwaysApply: true
6262

6363
---
6464

65+
## Changelog rules:
66+
- add an entry under `## [Unreleased]` in `CHANGELOG.md` for `feat:` and `fix:` PRs; skip for `chore:`, `ci:`, `refactor:`, `test:`, `docs:` unless the change is user-facing
67+
- use standard Keep a Changelog categories: `### Added`, `### Changed`, `### Deprecated`, `### Removed`, `### Fixed`, `### Security`
68+
- append `#PR_NUMBER` at the end of each changelog entry when the PR number is known
69+
- place new entries at the top of their category section (newest first)
70+
- never modify released version sections — only edit `## [Unreleased]`
71+
- create category headings on demand (don't add empty stubs)
72+
73+
---
74+
6575
## Rules for Android Unit tests and Instrumentation tests:
6676
- run unit tests for specific files like this: `./gradlew :app:testDevDebugUnitTest --tests "to.bitkit.repositories.LightningRepoTest"`
6777
- write unit tests in the same style and using same libraries as: `CurrencyRepoTest`, `LightningRepoTest`, `WalletRepoTest`

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!-- Closes | Fixes | Resolves #ISSUE_ID -->
2+
<!-- Changelog: Add an entry under ## [Unreleased] in CHANGELOG.md for user-facing changes (skip for chores/CI/refactors). -->
23
<!-- Brief summary of the PR changes, linking to the related resources (issue/design/bug/etc) if applicable. -->
34

45
### Description

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
local.properties
1212
# AI
1313
.ai
14+
.claude/worktrees
1415
*.local.*
1516
!*.local.template*
1617
# Secrets

.worktreeinclude

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Local build configuration
2+
local.properties
3+
4+
# Signing credentials
5+
keystore.*
6+
*.keystore
7+
8+
# Firebase
9+
google-services.json
10+
11+
# Claude Code local settings
12+
*.local.*
13+
14+
# Tooling
15+
tools/fcm-tester/service-account.json
16+
17+
# JetBrains IDEs (Android Studio, IDEA)
18+
.idea
19+
20+
# AI agents local memory caches
21+
.ai

AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ suspend fun getData(): Result<Data> = withContext(Dispatchers.IO) {
237237
- ALWAYS use `.toImmutableList()`, `.toImmutableMap()`, `.toImmutableSet()` when producing collections for UI state
238238
- ALWAYS use `persistentListOf()`, `persistentMapOf()`, `persistentSetOf()` for default values in UiState fields
239239

240+
### Changelog
241+
242+
- ALWAYS add an entry under `## [Unreleased]` in `CHANGELOG.md` for `feat:` and `fix:` PRs; skip for `chore:`, `ci:`, `refactor:`, `test:`, `docs:` unless the change is user-facing
243+
- USE standard Keep a Changelog categories: `### Added`, `### Changed`, `### Deprecated`, `### Removed`, `### Fixed`, `### Security`
244+
- ALWAYS append `#PR_NUMBER` at the end of each changelog entry when the PR number is known
245+
- ALWAYS place new entries at the top of their category section (newest first)
246+
- NEVER modify released version sections — only edit `## [Unreleased]`
247+
- ALWAYS create category headings on demand (don't add empty stubs)
248+
240249
### Device Debugging (adb)
241250

242251
- App IDs per flavor: `to.bitkit.dev` (dev/regtest), `to.bitkit.tnet` (testnet), `to.bitkit` (mainnet)

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
[Unreleased]: https://github.com/synonymdev/bitkit-android/compare/v2.1.2...HEAD

0 commit comments

Comments
 (0)