chore(clerk-js): Create UI Retheme Changes Reminder GitHub workflow #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: UI Retheme Changes Reminder | |
on: | |
pull_request: | |
paths: | |
- 'packages/clerk-js/src/ui/**' | |
jobs: | |
check-changes: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check if comment already made | |
id: check_comment | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const issue_number = context.issue.number; | |
const comments = await github.rest.issues.listComments({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: issue_number | |
}); | |
return comments.data.some(comment => comment.body.includes('ui-retheme-reminder')); | |
- name: Post a comment if changes detected and no comment exists | |
if: steps.check_comment.outputs.result != 'true' | |
uses: peter-evans/[email protected] | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
<!-- ui-retheme-reminder --> | |
# ⚠️ Changes detected under the ClerkJS `ui` directory! | |
**Don't forget to apply the same changes under the `/ui.retheme` directory:** | |
`packages/clerk-js/src/ui/**` ➡️ `packages/clerk-js/src/ui.retheme/**` |