|
1 | | -> **Remove this section once the repo is customized** |
| 1 | +> **REMOEV THIS SECTION ONCE THE REPO IS SET UP.** |
2 | 2 | > |
3 | 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 | 4 | > ## One-time Setup |
5 | 5 | > |
6 | 6 | > ### Secure a scope for your org |
7 | 7 | > 1. Sign up at [app.codemod.com](https://app.codemod.com) with your GitHub account. |
8 | 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. |
| 9 | +> 1. Go to [app.codemod.com/studio](https://app.codemod.com/studio) |
| 10 | +> 2. In **Results**, click **Select Repo** |
| 11 | +> 3. Installing the app for a repo in your GitHub org reserves a **scope** matching your org name. |
12 | 12 | > - Example: only admins of the `nodejs` org can publish codemods starting with `@nodejs`. |
13 | 13 | > - All official codemods appear in the Registry under that scope. |
14 | | -> - **Important:** In each `codemod.yaml`, make sure `name` starts with your scope. |
| 14 | +> - **Important:** In each `codemod.yaml`, make sure `name` starts with your scope. |
15 | 15 | > |
16 | 16 | > ### Authorize GitHub Action |
17 | 17 | > 1. Generate an API key at [app.codemod.com/api-keys](https://app.codemod.com/api-keys). |
18 | 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. |
| 19 | +> 1. Create an environment (e.g. `production`) if it doesn’t exist. |
| 20 | +> 3. Open it → **Add environment secret**: |
| 21 | +> - Name: `CODEMOD_API_KEY` |
| 22 | +> - Value: the key from step 1. |
23 | 23 | > |
24 | 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 | 25 | --- |
|
0 commit comments