Skip to content

Commit

Permalink
chore(clerk-js): Create UI Retheme Changes Reminder GitHub workflow (#…
Browse files Browse the repository at this point in the history
…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
anagstef authored Nov 29, 2023
1 parent 4b8bedc commit 11a05e3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
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/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`

0 comments on commit 11a05e3

Please sign in to comment.