From ab41459f578004ed1d16e2a55a7b9b48955b3c8c Mon Sep 17 00:00:00 2001 From: Aditya Yadav Date: Tue, 31 Mar 2026 21:43:50 +0530 Subject: [PATCH 1/3] test --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +test From ecd06c222ffdbe73c7855805684f96a812c7f304 Mon Sep 17 00:00:00 2001 From: Aditya Yadav Date: Tue, 31 Mar 2026 21:49:55 +0530 Subject: [PATCH 2/3] added --- .github/workflows/check-changeset.yml | 19 ++++++++++--------- test.txt | 3 +++ 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/check-changeset.yml b/.github/workflows/check-changeset.yml index a0ef164..72c6227 100644 --- a/.github/workflows/check-changeset.yml +++ b/.github/workflows/check-changeset.yml @@ -1,10 +1,17 @@ -name: Check for Changesets +name: Check Changeset on: pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] branches: - main + # Avoid triggering this check for automated versioning PRs. + # These PRs only update metadata and delete changesets, so they + # don't require a new changeset file to be added. + paths-ignore: + - "package*.json" + - "CHANGELOG.md" + - ".changeset/**" permissions: pull-requests: write # Required for leaving comments @@ -70,12 +77,6 @@ jobs: owner, repo, issue_number, - body: `${marker}\n### ⚠️ Changeset Missing\n\n - This PR does not have a changeset file. To help us effectively version these updates, please run the following command locally:\n\n - \`\`\`bash\nnpx changeset\n\`\`\`\n\n - Follow the prompts to select the version bump and write a short summary.Run: - \n\n\`\`\`bash\ngit add ./.changeset/\n\`\`\`\n\n - Then commit and push the changes to this branch.\n\n - _If this PR doesn't require a version bump (e.g., docs, CI updates), maintainers can apply the \`skip changeset\` label to bypass this check._` + body: `${marker}\n### ⚠️ Changeset Missing\n\nThis PR does not have a changeset file. To help us effectively version these updates, please run the following command locally:\n\n\`\`\`bash\nnpx changeset\n\`\`\`\n\nFollow the prompts to select the version bump and write a short summary. Then, commit the new file in the \`.changeset\` directory to this branch.\n\n_If this PR doesn't require a version bump (e.g., docs, CI updates), maintainers can apply the \`skip changeset\` label to bypass this check._` }); - } + } \ No newline at end of file diff --git a/test.txt b/test.txt index 9daeafb..7aebe56 100644 --- a/test.txt +++ b/test.txt @@ -1 +1,4 @@ test +ewrw +werwq + From ce0e1e0507ed5b0009bf9d530d85ed1ea49bf618 Mon Sep 17 00:00:00 2001 From: Aditya Yadav Date: Wed, 1 Apr 2026 23:12:57 +0530 Subject: [PATCH 3/3] Delete check-changeset.yml --- .github/workflows/check-changeset.yml | 82 --------------------------- 1 file changed, 82 deletions(-) delete mode 100644 .github/workflows/check-changeset.yml diff --git a/.github/workflows/check-changeset.yml b/.github/workflows/check-changeset.yml deleted file mode 100644 index 72c6227..0000000 --- a/.github/workflows/check-changeset.yml +++ /dev/null @@ -1,82 +0,0 @@ -name: Check Changeset - -on: - pull_request: - types: [opened, synchronize, reopened, labeled, unlabeled] - branches: - - main - # Avoid triggering this check for automated versioning PRs. - # These PRs only update metadata and delete changesets, so they - # don't require a new changeset file to be added. - paths-ignore: - - "package*.json" - - "CHANGELOG.md" - - ".changeset/**" - -permissions: - pull-requests: write # Required for leaving comments - contents: read - -jobs: - changeset-check: - runs-on: ubuntu-latest - - steps: - - name: Check for Bypass Label - id: check-label - run: | - if [[ "${{ contains(github.event.pull_request.labels.*.name, 'skip changeset') }}" == "true" ]]; then - echo "skip=true" >> "$GITHUB_OUTPUT" - echo "✅ 'skip changeset' label found. Bypassing check." - else - echo "skip=false" >> "$GITHUB_OUTPUT" - fi - - - uses: actions/checkout@v4 - if: steps.check-label.outputs.skip != 'true' - with: - fetch-depth: 0 - - - name: Check for changeset - id: check - if: steps.check-label.outputs.skip != 'true' - run: | - CHANGED=$(git diff --name-only origin/main...HEAD | grep "^.changeset/.*\.md$" || true) - - if [ -z "$CHANGED" ]; then - echo "found=false" >> "$GITHUB_OUTPUT" - echo "❌ No changeset found. Run 'npx changeset' locally to create one for your changes." - exit 1 - else - echo "found=true" >> "$GITHUB_OUTPUT" - echo "✅ Changeset detected:" - echo "$CHANGED" - fi - - - name: Comment on PR if missing - if: failure() && steps.check.outputs.found == 'false' - uses: actions/github-script@v7 - with: - script: | - const marker = ''; - const { owner, repo } = context.repo; - const issue_number = context.issue.number; - - // Fetch existing comments on the PR - const comments = await github.rest.issues.listComments({ - owner, - repo, - issue_number - }); - - const hasCommented = comments.data.some(c => c.body.includes(marker)); - - // Only comment if we haven't already - if (!hasCommented) { - await github.rest.issues.createComment({ - owner, - repo, - issue_number, - body: `${marker}\n### ⚠️ Changeset Missing\n\nThis PR does not have a changeset file. To help us effectively version these updates, please run the following command locally:\n\n\`\`\`bash\nnpx changeset\n\`\`\`\n\nFollow the prompts to select the version bump and write a short summary. Then, commit the new file in the \`.changeset\` directory to this branch.\n\n_If this PR doesn't require a version bump (e.g., docs, CI updates), maintainers can apply the \`skip changeset\` label to bypass this check._` - }); - } \ No newline at end of file