Creating a Repository

This public content is an excerpt from Flutter staff GitHub docs. It is published as a reference to show how GitHub is used for inner source at Flutter.

This guide explains how to create a new repository. Remember – if you create a repository you are responsible for maintaining it.

Naming

A good repository name allows users to accurately guess its contents. Repositories in Flutter-Global follow the conventions:

  • repository names MUST be lower case, using a dash (-) as a word separator.
  • use a relevant prefix to group several related repos together. e.g. for the fixed odds cashout quote functionality this is fcq-.
  • for the primary repository of an application use -service suffix, e.g. fcq-service.
  • each division usually maintains its own deployment repository for specific divisional configuration. If these repos live in Flutter-Global they usually contain config to indicate their contents. Show divisional ownership with a suffix (e.g. -ppb, -fdg, or -isp). e.g. fcq-config-ppb contains PPB deployment config for the FCQ service.

Creating

To create a new repository, add a repository configuration file within the appropriate capability folder. If the repository does not already exist in Flutter-Global, the Codebase Governor will automatically create it and apply all necessary configurations.

To create a new repository, follow these steps:

  1. Navigate to the [org-config] repository main page.
  2. Open the codebases folder.
  3. Open your capability folder or create a new one.
  4. Click the Add file > Create new file button.
  5. Enter your repository name in the Name your file... field. The file name must follow the <NAME_OF_REPOSITORY>.yml pattern. For example, for a repository named video-broadcast, the filename would be video-broadcast.yml.
  6. Add the repository configuration properties in the file contents textarea.
  7. Click on the Commit changes... button.
  8. Add a Commit message.
  9. Click on Propose changes to open a Pull Request.

After your pull request is open, CBG will run and display a comment similar to the image.

Once the pull request is approved and merged, CBG will create the repository and apply any changes defined in the configuration.

You can find the full guide on how to create, rename, and delete repositories here.

Configure Your Repo

To setup your repository:

  1. Choose a branching model: how do contributors propose changes, and who approves them?
  2. Choose an access model: who can access the repository, and with what permissions?
  3. Use Codebase Governor to quickly and easily setup (1) and (2) in an audit friendly way.

Read more about maintaining your repository.

Details

Use a Repo
Maintaining a Repository