-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(clerk-js): Create UI Retheme Changes Reminder GitHub workflow (#…
…2225) * chore(clerk-js): Create UI Retheme Changes Reminder GitHub workflow * chore(clerk-js): Run the workflow only when target branch is main * chore(clerk-js): Change text to inclue `.retheme` files
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: UI Retheme Changes Reminder | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
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/create-or-update-comment@v3.0.0 | ||
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/**` | ||
Also, you may need to update the following files: | ||
- `packages/localizations/src/en-US.retheme.ts` | ||
- `packages/localizations/src/index.retheme.ts` | ||
- `packages/types/src/appearance.retheme.ts` | ||
- `packages/types/src/clerk.retheme.ts` | ||
- `packages/types/src/index.retheme.ts` | ||
- `packages/types/src/localization.retheme.ts` |