Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
8 changes: 8 additions & 0 deletions .changeset/README.md
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).
14 changes: 14 additions & 0 deletions .changeset/config.json
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": []
}
2 changes: 2 additions & 0 deletions .changeset/fresh-spoons-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 MEDIUM RISK

This PR is missing a changeset file. Based on the logic added in this line, the CI job will fail because no file matching '.changeset/*.md' (excluding README.md) was found in the diff. Please add a changeset using 'npx changeset' or 'npx changeset --empty'.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already addressed — an empty changeset was added in the second commit (fresh-spoons-build.md). The changeset-check job is now passing.

🤖 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
Comment on lines +50 to +60
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already addressed — an empty changeset was added in the second commit. The changeset-check CI job is passing.

🤖 Generated by /pr-fixup command

echo "Found $CHANGESETS changeset file(s) changed in this PR."
40 changes: 0 additions & 40 deletions .github/workflows/publish.yml

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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: Create Release PR or Publish
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 HIGH RISK

The release workflow currently publishes the package without running tests. Since ci.yml and release.yml run concurrently on pushes to main, a failing build on main could still result in a successful (but broken) package publication. Add a test step before the release action. Try running the following prompt in your coding agent: > Add a 'Test' step running 'npm test' before the 'Create Release PR or Publish' step in .github/workflows/release.yml.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — adding a test step before publish in release.yml, and setting NPM_CONFIG_PROVENANCE=true to preserve provenance signing.

🤖 Generated by /pr-fixup command

uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1
with:
publish: npm run release
Comment on lines +32 to +44
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — adding a test step before the changesets action in release.yml.

🤖 Generated by /pr-fixup command

title: "chore: version packages"
commit: "chore: version packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — adding NPM_CONFIG_PROVENANCE=true to the changesets action env to preserve provenance signing.

🤖 Generated by /pr-fixup command

Loading
Loading