|
1 | 1 | > **Remove this section once the repo is customized** |
2 | 2 | > |
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 | +--- |
4 | 26 |
|
5 | 27 | Official <FRAMEWORK_OR_SDK_OR_ORG> codemods to help users adopt new features and handle breaking changes with ease. |
6 | 28 |
|
|
0 commit comments