-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add changeset for v1.0.5 changes #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
b3fb231
7535334
e26b0e1
b1a4ef4
c887f49
6d26dd5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Changesets | ||
|
|
||
| Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
| with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
| find the full documentation for it [in our repository](https://github.com/changesets/changesets). | ||
|
|
||
| We have a quick list of common questions to get you started engaging with this project in | ||
| [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json", | ||
| "changelog": [ | ||
| "@changesets/changelog-github", | ||
| { "repo": "codacy/codacy-cloud-cli" } | ||
| ], | ||
| "commit": false, | ||
| "fixed": [], | ||
| "linked": [], | ||
| "access": "public", | ||
| "baseBranch": "main", | ||
| "updateInternalDependencies": "patch", | ||
| "ignore": [] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| "codacy-cloud-cli": minor | ||
|
alerizzo marked this conversation as resolved.
Outdated
|
||
| --- | ||
|
|
||
| ### Changes since v1.0.5 | ||
|
|
||
| - **`--tools` filter for issues command** (#4): Added `--tools` option to filter issues by the tool/pattern that detected them. Includes new formatting utilities for tool name display. | ||
|
|
||
| - **Filter and bulk-ignore for false positives** (#5): Added `--category` and `--severity` filters to the issues command. Introduced bulk-ignore functionality to ignore multiple issues matching filter criteria, streamlining false-positive triage workflows. | ||
|
|
||
| - **Pin GitHub Actions to SHA hashes** (#2): Pinned all GitHub Actions workflow dependencies to commit SHAs for improved supply-chain security. | ||
|
|
||
| - **Adopt changesets for automated versioning and publishing** (#6): Replaced the manual publish workflow with a changesets-based release pipeline. PRs now require a changeset file, and merging to main triggers automated version bumps and npm publishing with provenance. | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -37,3 +37,25 @@ jobs: | |||||
|
|
||||||
| - name: Test | ||||||
| run: npm test | ||||||
|
|
||||||
| changeset-check: | ||||||
| if: github.event_name == 'pull_request' | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| steps: | ||||||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||
| with: | ||||||
| fetch-depth: 0 | ||||||
|
|
||||||
| - name: Check for changesets | ||||||
| run: | | ||||||
| # Count .changeset/*.md files added/modified in this PR compared to the base branch | ||||||
| CHANGESETS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD -- '.changeset/*.md' ':!.changeset/README.md' | wc -l) | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 MEDIUM RISK Filter the git diff to only count added or modified files to ensure a new changeset is actually provided.
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sensible hardening — added 🤖 Generated by /pr-fixup command |
||||||
| if [ "$CHANGESETS" -eq 0 ]; then | ||||||
| echo "::error::No changeset found for this PR. Run 'npx changeset' to describe your changes." | ||||||
| echo "" | ||||||
| echo "If this PR does not require a version bump (e.g., docs-only or CI changes)," | ||||||
| echo "add an empty changeset with: npx changeset --empty" | ||||||
| exit 1 | ||||||
| fi | ||||||
| echo "Found $CHANGESETS changeset file(s) changed in this PR." | ||||||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| concurrency: | ||
| group: release-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| id-token: write | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
| registry-url: "https://registry.npmjs.org" | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Generate API client | ||
| run: npm run update-api | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
|
|
||
| - name: Test | ||
| run: npm test | ||
|
|
||
| - name: Create Release PR or Publish | ||
| uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1 | ||
| with: | ||
| publish: npm run release | ||
| title: "chore: version packages" | ||
| commit: "chore: version packages" | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| NPM_CONFIG_PROVENANCE: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| # Deployment & CI Spec | ||
|
|
||
| **Status:** ✅ Done (2026-02-18) | ||
| **Status:** ✅ Done (updated 2026-05-08) | ||
|
|
||
| ## npm Package | ||
|
|
||
| - **Binary name:** `codacy` (registered in `package.json` under `bin`) | ||
| - **Included files:** `dist/` and `README.md` (via `files` field) | ||
| - **Pre-publish:** `prepublishOnly` runs `npm run build` using `tsconfig.build.json` | ||
| - **Engines:** requires Node.js >= 18 | ||
| - **Pre-publish:** `prepublishOnly` runs `npm run update-api && npm run build` as a safety net for local publishes | ||
| - **Engines:** requires Node.js >= 20 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ⚪ LOW RISK Suggestion: Since you are bumping the required Node version to 20, update the test matrix in
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Valid — removed Node 18 from the CI matrix to align with the 🤖 Generated by /pr-fixup command |
||
| - **Install globally:** `npm install -g "@codacy/codacy-cloud-cli"` | ||
|
|
||
| ## GitHub Actions | ||
|
|
@@ -18,23 +18,26 @@ Triggers on: push and pull requests to `main`. | |
|
|
||
| Matrix: Node.js 18, 20, 22. | ||
|
|
||
| Steps: | ||
| 1. Checkout | ||
| 2. Setup Node | ||
| 3. `npm ci` | ||
| 4. `npm run build` | ||
| 5. `npm test` | ||
| Jobs: | ||
| - **build-and-test**: checkout → setup node → install → generate API client → type check → build → test | ||
| - **changeset-check** (PRs only): verifies at least one `.changeset/*.md` file is present in the PR diff | ||
|
|
||
| ### Release (`release.yml`) | ||
|
|
||
| ### Publish to npm (`publish.yml`) | ||
| Triggers on: push to `main`. | ||
|
|
||
| Triggers on: GitHub release published. | ||
| Uses the [changesets/action](https://github.com/changesets/changesets) to automate versioning and publishing. | ||
|
|
||
| Steps: | ||
| 1. Checkout | ||
| 2. Setup Node with `registry-url: https://registry.npmjs.org` | ||
| 3. `npm ci` | ||
| 4. `npm run build` | ||
| 5. `npm publish` (uses `NODE_AUTH_TOKEN` secret) | ||
| 4. Generate API client (`npm run update-api`) | ||
| 5. Build (`npm run build`) | ||
| 6. Test (`npm test`) | ||
| 7. `changesets/action` — either: | ||
| - Creates/updates a "chore: version packages" PR (bumps version, updates CHANGELOG.md) | ||
| - If that PR was just merged, runs `changeset publish` to publish to npm with provenance | ||
|
|
||
| ## Homebrew Formula | ||
|
|
||
|
|
@@ -44,5 +47,5 @@ Planned for future distribution as a separate brew formula for macOS/Linux/Windo | |
|
|
||
| | Secret | Used by | | ||
| |---|---| | ||
| | `NODE_AUTH_TOKEN` | npm publish workflow | | ||
| | `NPM_TOKEN` | Release workflow (`NODE_AUTH_TOKEN` for npm publish) | | ||
| | `CODACY_API_TOKEN` | CLI runtime (env var, not a secret in CI) | | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 HIGH RISK
The package name in the changeset header must match the '@codacy/codacy-cloud-cli' name defined in package.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch — the package name must match the scoped name in package.json. Fixed to
@codacy/codacy-cloud-cli.🤖 Generated by /pr-fixup command