Skip to content

Commit afc18b6

Browse files
chore: Add onboarding guide specifically for repositories and libraries (#2607)
Signed-off-by: ldetmer <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 9902b1d commit afc18b6

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

doc/language-onboarding.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,3 @@ go run ./cmd/librarian/ generate -repo=<your repository> -push
337337
export LIBRARIAN_GITHUB_TOKEN=$(gh auth token)
338338
go run ./cmd/librarian/ release init -repo=<your repository> -push
339339
```
340-
341-
## Language repository settings
342-
343-
To correctly parse the commit message of a merge commit, only allow squash merging
344-
and set the default commit message to **Pull request title and description**.
345-
![Pull request settings](assets/setting-pull-requests.webp)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Repository/Library Onboarding Guide
2+
3+
This guide should be followed when onboarding new repositories/libraries.
4+
5+
## Repository Setup:
6+
1) Add .librarian directory to your repository with appropriate configuration files. See details [here](https://github.com/googleapis/librarian/blob/main/doc/language-onboarding.md#configuration-files)
7+
2) You should only start with 1 library to validate the flow (follow instructions below)
8+
3) If your repository contains multiple libraries, start ramping up slowly until all libraries are in your state.yaml file and have migrated to librarian.
9+
4) To complete onboarding you should run the librarian test-container generate command to validate that all libraries are getting generated correctly. Note this command is WIP, [documentation will be added](https://github.com/googleapis/librarian/issues/2621) once available.
10+
5) To correctly parse the commit message of a merge commit, only allow squash merging
11+
and set the default commit message to **Pull request title and description**.
12+
![Pull request settings](assets/setting-pull-requests.webp)
13+
14+
## Library Setup:
15+
1) Ensure all OwlBot PRs for that library have been merged and then release the library using a release-please PR
16+
2) Remove the library from your OwlBot config
17+
- If you have an .Owlbot.yaml config file with multiple libraries, remove the library from .Owlbot.yaml file.
18+
- If your .Owlbot.yaml config file contains only the single library, remove the .Owlbot.yaml file itself.
19+
3) Remove the library from your release-please config
20+
- For a monolithic repo remove the path entry for the library in your release-please-config.json and .release-please-manifest.json files
21+
- For a single library repository, remove all the release-please config (.github/release-please.yml, release-please-config.json if it exists, .release-please-manifest.json if it exists)
22+
4) There is no requirement to stop using library-specific OwlBot post-processing files as part of this migration. However, while migrating, please open an issue in your generator repository for any improvements that could reduce your library's post-processing logic.
23+
5) Add your library to your [libraries object](https://github.com/googleapis/librarian/blob/main/doc/state-schema.md#libraries-object) in your [state.yaml](https://github.com/googleapis/librarian/blob/main/doc/state-schema.md#stateyaml-schema) file
24+
6) Run [librarian generate command](https://github.com/googleapis/librarian/blob/main/doc/cli-commands.md#generate-command). The output should be 0 diff, check with your language lead/generator owner if this is not the case.
25+
7) Be aware of the `generate_blocked` and `release_blocked` fields in the [config.yaml file](https://github.com/googleapis/librarian/blob/main/doc/config-schema.md#libraries-object). If these are set to `true` and automation is enabled for the repository ([check here](https://github.com/googleapis/librarian/blob/main/internal/automation/prod/repositories.yaml)), then generate and release PRs will be created and merged automatically. If these actions are blocked, or your repository is not set up for automation, you will have to perform these actions manually. See this [guide](https://github.com/googleapis/librarian/blob/main/doc/library-maintainer-guide.md) for details

0 commit comments

Comments
 (0)