Skip to content
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

chore(clerk-js): Create UI Retheme Changes Reminder GitHub workflow #2225

Merged
merged 3 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .changeset/many-dragons-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
44 changes: 44 additions & 0 deletions .github/workflows/ui-retheme-changes-reminder.yml
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/[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/**`

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`
Loading