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
5 changes: 5 additions & 0 deletions .changeset/add-file-picker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labcatr/labcommitr": minor
---

Add interactive file picker for selecting files to commit directly from the CLI
5 changes: 5 additions & 0 deletions .changeset/cool-color-palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labcatr/labcommitr": patch
---

Update UI color palette to cool-toned theme with improved contrast
5 changes: 5 additions & 0 deletions .changeset/fix-commit-ux-polish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labcatr/labcommitr": patch
---

Fix double body label, reduce preview spacing, and add trailing blank after action prompt
5 changes: 5 additions & 0 deletions .changeset/fix-missing-fields-display.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labcatr/labcommitr": patch
---

Only show missing required fields message when partial CLI parameters are provided
5 changes: 5 additions & 0 deletions .changeset/fix-prompt-ghost-lines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labcatr/labcommitr": patch
---

Fix terminal ghost lines when prompt content wraps at terminal width
5 changes: 5 additions & 0 deletions .changeset/fix-resize-ghost-lines-v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@labcatr/labcommitr": patch
---

Fix terminal resize ghost lines by storing physical line count at render time
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Test Compilation
on:
pull_request:
branches:
branches:
- '!main'
push:
branches:
branches:
- '!main'

jobs:
tsc:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: latest
version: latest

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"

- name: Install dependencies
Expand Down
41 changes: 29 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Release workflow: versions via changesets and publishes to npm.
#
# Uses OIDC trusted publishing — no long-lived npm tokens needed.
# Requires trusted publisher configured on npmjs.org:
# https://www.npmjs.com/package/@labcatr/labcommitr/access
# → Trusted Publisher → GitHub Actions
# → Organization: labcatr, Repository: labcommitr, Workflow: release.yml
name: Release

on:
Expand All @@ -16,41 +23,51 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
actions: write
contents: write
pull-requests: write
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PNPM
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: latest
version: latest

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
cache: "pnpm"
registry-url: "https://registry.npmjs.org"

- name: Install dependencies
run: pnpm install

- name: Build Packages
run: pnpm run build

- name: Create Release Pull Request or Publish
# Versioning only — publish is handled separately via OIDC
- name: Create Release Pull Request
id: changesets
uses: changesets/action@v1
with:
# Note: pnpm install after versioning is necessary to refresh lockfile
version: pnpm run version
publish: pnpm exec changeset publish
commit: "[ci] release"
title: "[ci] release"
env:
# Uses built-in GITHUB_TOKEN (automatically available, no secret needed)
GITHUB_TOKEN: ${{ secrets.LAB_ACTIONS_TOKEN }}
# Needs access to publish to npm
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

# Publish via OIDC trusted publishing (no npm token required)
- name: Publish to npm
if: steps.changesets.outputs.hasChangesets == 'false'
run: |
npm install -g npm@latest
CURRENT_VERSION=$(node -p "require('./package.json').version")
PUBLISHED=$(npm view @labcatr/labcommitr version 2>/dev/null || echo "")
if [ "$CURRENT_VERSION" != "$PUBLISHED" ]; then
echo "Publishing @labcatr/labcommitr@${CURRENT_VERSION}"
npm publish --provenance --access public
else
echo "Version ${CURRENT_VERSION} already published, skipping."
fi
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,13 @@ pnpm run dev:cli test status

See [`TESTING.md`](TESTING.md) for complete testing documentation.

### Publishing (maintainers)

Releases run on push to `main` via `.github/workflows/release.yml` and publish to npm. If publish fails with **E404** or **"Access token expired or revoked"**:

1. **npm organization** – The scope `@labcatr` must exist on npm. Create an organization named `labcatr` at [npmjs.com](https://www.npmjs.com/) and ensure the publishing user can publish there.
2. **GitHub secret** – Create a new npm token (npm Profile → Access Tokens). In the repo set **Settings → Secrets and variables → Actions** → `NPM_AUTH_TOKEN` to that token. If 2FA is required for publishing, use a token type that supports it or temporarily disable 2FA for package publish.

---

## Contributing
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
"cli",
"npmtool"
],
"repository": "https://github.com/labcatr/labcommitr",
"repository": {
"type": "git",
"url": "git+https://github.com/labcatr/labcommitr.git"
},
"homepage": "https://github.com/labcatr/labcommitr#readme",
"author": "Trevor Fox",
"license": "ISC",
Expand Down
Loading
Loading