Skip to content

Commit 36a5cb0

Browse files
Enhance README with setup instructions for codemods
1 parent 6d6deef commit 36a5cb0

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
> **Remove this section once the repo is customized**
22
>
3-
> Framework/SDK maintainers: This template comes with setup guides, utilities, and a GitHub Action to help you and your community build and publish codemods with ease. After the set up, once you approve codemod PRs, they’ll be automatically published as official codemods to the [Codemod Registry](https://app.codemod.com/registry) under your org scope. Check out the [Node.js codemods](https://codemod.link/nodejs-official) for an example. See [AUTO_PUBLISH_SETUP.md](.github/AUTO_PUBLISH_SETUP.md) for setup instructions.
3+
> Framework/SDK maintainers: This template comes with setup guides, utilities, and a GitHub Action to help you and your community build and publish codemods with ease.
4+
> ## One-time Setup
5+
>
6+
> ### Secure a scope for your org
7+
> 1. Sign up at [app.codemod.com](https://app.codemod.com) with your GitHub account.
8+
> 2. Install the Codemod app:
9+
> - Go to [app.codemod.com/studio](https://app.codemod.com/studio)
10+
> - In **Results**, click **Select Repo**
11+
> - Installing the app for a repo in your GitHub org reserves a **scope** matching your org name.
12+
> - Example: only admins of the `nodejs` org can publish codemods starting with `@nodejs`.
13+
> - All official codemods appear in the Registry under that scope.
14+
> - **Important:** In each `codemod.yaml`, make sure `name` starts with your scope.
15+
>
16+
> ### Authorize GitHub Action
17+
> 1. Generate an API key at [app.codemod.com/api-keys](https://app.codemod.com/api-keys).
18+
> 2. In your repo: **Settings → Environments**
19+
> - Create an environment (e.g. `production`) if it doesn’t exist.
20+
> - Open it → **Add environment secret**:
21+
> - Name: `CODEMOD_API_KEY`
22+
> - Value: the key from step 1.
23+
>
24+
> ✅ Done! Now, after a codemod PR is merged, you can trigger a GitHub Action to auto-publish it to the [Codemod Registry](https://app.codemod.com/registry) under your org scope. See [Node.js codemods](https://codemod.link/nodejs-official) for an example.
25+
---
426

527
Official <FRAMEWORK_OR_SDK_OR_ORG> codemods to help users adopt new features and handle breaking changes with ease.
628

0 commit comments

Comments
 (0)