### Install p-graph Source: https://github.com/microsoft/beachball/blob/main/packages/p-graph/README.md Install the p-graph package using npm. ```bash $ npm install p-graph ``` -------------------------------- ### Install Beachball with Yarn Source: https://github.com/microsoft/beachball/blob/main/docs/overview/installation.md Install Beachball as a devDependency using Yarn. Use the -W flag if you are in a monorepo. ```bash yarn add -D beachball ``` -------------------------------- ### Install Beachball with npm Source: https://github.com/microsoft/beachball/blob/main/docs/overview/installation.md Install Beachball as a devDependency using npm. This is typically done at the repository root in a monorepo. ```bash npm install -D beachball ``` -------------------------------- ### Example Change File Structure Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/change-files.md A typical change file in JSON format used by Beachball to record changes for a package. ```json { "comment": "Upgrading React to 16.8.x to use hooks", "type": "minor", "packageName": "my-amazing-app", "email": "me@me.me" } ``` -------------------------------- ### Repository-Level Configuration (beachball.config.js) Source: https://github.com/microsoft/beachball/blob/main/docs/overview/configuration.md Use a JavaScript file at the repository root for flexible, commentable configuration. This example sets disallowed change types and a change hint. ```javascript // @ts-check /** @type {import('beachball').BeachballConfig} */ const config = { disallowedChangeTypes: ['major'], changehint: 'Run "yarn change" to generate a change file', groupChanges: true, }; module.exports = config; ``` -------------------------------- ### Install Beachball Change File Skill using GitHub CLI Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ai-integration.md Installs the Beachball change file skill for AI agents via the GitHub CLI. This enables automated change file generation. ```sh gh skill install microsoft/beachball beachball-change-file ``` -------------------------------- ### Import fs/promises Example Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use direct imports for `fs/promises` to enable Jest mocking. Avoid `fs.promises`. ```typescript import "fs/promises"; ``` -------------------------------- ### Package-Level Configuration (package.json) Source: https://github.com/microsoft/beachball/blob/main/docs/overview/configuration.md Override repository-level settings for individual packages by adding a 'beachball' key to their package.json. This example nullifies disallowed change types for the 'foo' package. ```json { "name": "foo", "version": "1.0.0", "beachball": { "disallowedChangeTypes": null } } ``` -------------------------------- ### Install Beachball Action in GitHub Actions Workflow Source: https://github.com/microsoft/beachball/blob/main/actions/install-beachball/README.md This snippet shows how to integrate the install-beachball action into a GitHub Actions workflow. Ensure you check out the code first. ```yaml jobs: build: steps: # You must check out code before using this action - uses: actions/checkout@v6 - uses: microsoft/beachball/actions/install-beachball@install-beachball_v3 ``` -------------------------------- ### Install Specific Version of Beachball Change File Skill Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ai-integration.md Installs a specific version of the Beachball change file skill by pinning to a commit SHA. Useful for version control and reproducible builds. ```sh gh skill install microsoft/beachball beachball-change-file --pin abc123 ``` -------------------------------- ### config get Source: https://github.com/microsoft/beachball/blob/main/docs/cli/config.md Retrieves the value of a specific configuration setting. It can also show overrides for packages or groups. ```APIDOC ## config get ### Description Get the value of a specific config setting. If the setting can be overridden per-package or per-group, any overrides are also shown. ### Method CLI COMMAND ### Endpoint `beachball config get ` ### Parameters #### Path Parameters - **name** (string) - Required - The name of the configuration setting to retrieve. #### Query Parameters - **--package, -p** (string) - Optional - Get the effective value of the setting for specific package(s). Can be specified multiple times. ### Request Example ```bash $ beachball config get branch # "origin/main" $ beachball config get disallowedChangeTypes # Main value: null # Group overrides: # my-group: # disallowedChangeTypes: ["major"] # packageNames: ["pkg-a", "pkg-b"] $ beachball config get disallowedChangeTypes --package pkg-a # pkg-a: ["major"] $ beachball config get tag --package pkg-a --package pkg-b # pkg-a: "beta" # pkg-b: "latest" ``` ### Response #### Success Response (200) - **value** (string | null | array) - The configuration setting value, potentially including overrides. #### Response Example ```json { "example": "\"origin/main\"" } ``` ``` -------------------------------- ### Generate Random GUID Source: https://github.com/microsoft/beachball/blob/main/skills/beachball-change-file/SKILL.md Use this command to generate a random GUID, which is required for naming change files. ```bash node -e "console.log(crypto.randomUUID())" ``` -------------------------------- ### Run `beachball change` interactively Source: https://github.com/microsoft/beachball/blob/main/docs/cli/change.md Initiates an interactive prompt to guide through change file generation. Ensure all local changes are committed before running. ```bash $ beachball change ``` -------------------------------- ### Get config setting for specific packages Source: https://github.com/microsoft/beachball/blob/main/docs/cli/config.md Use the `--package` or `-p` option with `beachball config get ` to retrieve the effective value of a setting for one or more specific packages. This accounts for group membership and package-level overrides. ```bash $ beachball config get disallowedChangeTypes --package pkg-a # pkg-a: ["major"] ``` ```bash $ beachball config get tag --package pkg-a --package pkg-b # pkg-a: "beta" # pkg-b: "latest" ``` -------------------------------- ### Get a specific config setting Source: https://github.com/microsoft/beachball/blob/main/docs/cli/config.md Use `beachball config get ` to retrieve the value of a specific configuration setting. This command shows the main value and any group overrides. ```bash $ beachball config get branch # "origin/main" ``` ```bash $ beachball config get disallowedChangeTypes # Main value: null # Group overrides: # my-group: # disallowedChangeTypes: ["major"] # packageNames: ["pkg-a", "pkg-b"] ``` -------------------------------- ### should-release Action for Green Builds Source: https://github.com/microsoft/beachball/blob/main/actions/should-release/README.md To achieve a 'green' build, split the `should-release` action into a separate job. This allows the decision to be made before the main release job starts. ```yaml concurrency: "${{ github.workflow }}-${{ github.ref }}" jobs: prerelease: outputs: shouldRelease: "${{ steps.shouldRelease.outputs.shouldRelease }}" steps: - uses: actions/checkout@v6 - uses: microsoft/beachball/actions/should-release@should-release_v3 id: shouldRelease with: token: "${{ github.token }}" batch: true mode: output release: needs: prerelease if: "${{ needs.prerelease.outputs.shouldRelease == 'yes' }}" steps: # your steps here ``` -------------------------------- ### Publish Package in GitHub Actions Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ci-integration.md Runs the npm release script to publish the package using Beachball. This step assumes prior setup of Git credentials and that the npm token is available as an environment variable. ```yaml # No token needed with trusted publishing - name: Publish run: npm run release ``` -------------------------------- ### Running the Check for Modified Files Action Source: https://github.com/microsoft/beachball/blob/main/actions/check-for-modified-files/README.md Example of how to integrate the check-for-modified-files action into a GitHub Actions workflow. This step should be placed at the end of your workflow. ```yaml jobs: build: steps: # at the end of your workflow: - uses: microsoft/beachball/actions/check-for-modified-files@check-for-modified-files_v3 ``` -------------------------------- ### Configure Version Groups in beachball.json Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/groups.md Example configuration for defining version groups in your beachball.json file. This includes specifying package inclusion and exclusion patterns, as well as disallowed change types for the group. ```json { "groups": [ { "name": "group name", "include": ["packages/groupfoo/*"], "exclude": ["!packages/groupfoo/bar"], "disallowedChangeTypes": ["major"], }, ], } ``` -------------------------------- ### Import Type Example Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use `import type` for type-only imports to enforce type safety. ```typescript import type { SomeType } from "./some-module"; ``` -------------------------------- ### Validate Change Files in GitHub Actions Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/change-files.md Example of how to add a step in GitHub Actions to validate change files using npm or yarn. ```yaml # For GitHub Actions: ### With npm: - run: npm run checkchange ### With yarn: - run: yarn checkchange ``` -------------------------------- ### Validate Change Files in Azure Pipelines Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/change-files.md Example of how to add a script in Azure Pipelines to validate change files using npm or yarn. ```yaml # For Azure Pipelines: ### With npm: - script: npm run checkchange ### With yarn: - script: yarn checkchange ``` -------------------------------- ### config list Source: https://github.com/microsoft/beachball/blob/main/docs/cli/config.md Lists all configuration settings, including defaults, group overrides, and package-specific overrides. ```APIDOC ## config list ### Description List all config settings (including defaults), plus any group and per-package overrides. ### Method CLI COMMAND ### Endpoint `beachball config list` ### Parameters This subcommand has no additional options. ### Request Example ```bash $ beachball config list # Main options (including defaults): # access: "restricted" # branch: "origin/main" # bump: true # ... # Group overrides: # my-group: # packageNames: ["pkg-a", "pkg-b"] # disallowedChangeTypes: ["major"] # Package overrides: # pkg-c: # tag: "beta" ``` ### Response #### Success Response (200) - **settings** (object) - An object containing all configuration settings, group overrides, and package overrides. #### Response Example ```json { "example": "# Main options (including defaults):\n# access: \"restricted\"\n# branch: \"origin/main\"\n# bump: true\n# ...\n\n# Group overrides:\n# my-group:\n# packageNames: [\"pkg-a\", \"pkg-b\"]\n# disallowedChangeTypes: [\"major\"]\n\n# Package overrides:\n# pkg-c:\n# tag: \"beta\"" } ``` ``` -------------------------------- ### Beachball CLI Help Source: https://github.com/microsoft/beachball/blob/main/packages/beachball/README.md Displays the general usage of the Beachball command-line interface. ```bash beachball [command] [options] ``` -------------------------------- ### Top-level Monorepo Build Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to build the entire monorepo from the top level. ```bash yarn build ``` -------------------------------- ### List all config settings Source: https://github.com/microsoft/beachball/blob/main/docs/cli/config.md Use `beachball config list` to display all configuration settings, including their main values, defaults, group overrides, and package-specific overrides. The output format resembles YAML but is not intended for parsing. ```bash $ beachball config list # Main options (including defaults): # access: "restricted" # branch: "origin/main" # bump: true # ... # Group overrides: # my-group: # packageNames: ["pkg-a", "pkg-b"] # disallowedChangeTypes: ["major"] # Package overrides: # pkg-c: # tag: "beta" ``` -------------------------------- ### GitHub Actions workflow for publishing Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ci-integration.md A sample GitHub Actions workflow for publishing packages with Beachball, utilizing environments and trusted publishing. ```yaml # Add trigger configuration of your choice (this one is manual only) on: workflow_dispatch: environment: release ``` -------------------------------- ### Basic Usage of should-release Action Source: https://github.com/microsoft/beachball/blob/main/actions/should-release/README.md This is the most basic way to run the action. It will result in a 'red' build if the run is canceled. A `concurrency` setting is required if `batch: true` is set. ```yaml concurrency: "${{ github.workflow }}-${{ github.ref }}" jobs: release: steps: # You must check out code before running this action - uses: actions/checkout@v6 - uses: microsoft/beachball/actions/should-release@should-release_v3 with: token: "${{ github.token }}" batch: true ``` -------------------------------- ### Generate Change File with npm/yarn Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/change-files.md Commands to generate a change file using npm or yarn, with interactive prompts for description and type. ```bash # for npm $ npm run change # for yarn $ yarn change ``` -------------------------------- ### Create Change Files Interactively Source: https://github.com/microsoft/beachball/blob/main/packages/beachball/README.md Initiates an interactive process to create change files for modified packages. ```bash beachball change ``` -------------------------------- ### Beachball Package All Tests Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to run all tests for the `beachball` package in the correct order. Navigate into the `beachball` package directory first. ```bash yarn test:all ``` -------------------------------- ### Run `beachball change` with options Source: https://github.com/microsoft/beachball/blob/main/docs/cli/change.md Skips the interactive prompt by providing a message and type for all changed packages. Useful for automating change file creation. ```bash beachball change --type patch --message 'some message' ``` -------------------------------- ### Define and Run a Promise Graph with Node Definitions Source: https://github.com/microsoft/beachball/blob/main/packages/p-graph/README.md Define nodes with individual run functions and dependencies, then execute the graph. Nodes can optionally have a priority. ```typescript import { PGraph, type DependencyList, type PGraphNodeRecord } from 'p-graph'; // Mapping from node IDs to definitions (can be either an object or map). // `run` functions can be sync or async. Nodes can optionally define a `priority`. // (Alternatively, you can omit the `run` functions here and specify a single // function to `pGraph.run()`.) const nodeMap: PGraphNodeRecord = { putOnShirt: { run: () => console.log('put on your shirt') }, putOnShorts: { run: () => console.log('put on your shorts') }, putOnJacket: { run: () => console.log('put on your jacket') }, putOnShoes: { run: () => console.log('put on your shoes') }, tieShoes: { run: () => console.log('tie your shoes') }, }; // List of tuples describing dependencies (edges) between node IDs: // the first task must complete before the second one begins. const dependencies: DependencyList = [ // You need to put your shoes on before you tie them! ['putOnShoes', 'tieShoes'], ['putOnShirt', 'putOnJacket'], ['putOnShorts', 'putOnJacket'], ['putOnShorts', 'putOnShoes'], ]; // Run the tasks (log to console) in dependency order await new PGraph(nodeMap, dependencies).run(); ``` -------------------------------- ### Update Beachball Change File Skill Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ai-integration.md Updates the installed Beachball change file skill to the latest available version. Ensure your AI agent has the most recent functionality. ```sh gh skill update beachball-change-file ``` -------------------------------- ### Run Beachball Migrate Command Source: https://github.com/microsoft/beachball/blob/main/docs/cli/migrate.md Execute the 'beachball migrate' command in your project's root directory to check for configuration compatibility with v3. This command logs any required updates to the console. ```bash beachball migrate ``` -------------------------------- ### Beachball Package Unit Tests Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to run only the unit tests for the `beachball` package. Navigate into the `beachball` package directory first. ```bash yarn test:unit ``` -------------------------------- ### Configure Grouped Changelogs Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/groups.md This JSON configuration demonstrates how to set up grouped changelogs. It specifies packages to include and exclude, the master package for the group, and the path for the consolidated changelog file. Use this to manage changelogs for related packages in a monorepo. ```json { "changelog": { "groups": [ { "masterPackageName": "foo", "changelogPath": ".", "include": ["packages/*"], "exclude": ["!packages/baz"] } ] } } ``` -------------------------------- ### Modify Dependent Package Bump Type Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/bump-algorithm.md To alter the change type of a dependent package bump, modify the change file to specify 'dependentChangeType'. This example shows how to make a dependent package also bump with 'minor' instead of the default 'patch'. ```diff { "comment": "Upgrading fooLib", "type": "patch", "packageName": "fooLib", "email": "me@me.me", "commit": "b785112c03f063b71d936ff052470817019267d4", "date": "2019-06-20T22:54:59.172Z", + "dependentChangeType": "minor" } ``` -------------------------------- ### Configure package.json script for publishing Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ci-integration.md Use a package.json script to set custom options for beachball publish, such as access level for public scoped packages. ```json { "scripts": { "release": "beachball publish --access public" } } ``` -------------------------------- ### Beachball Migrate: No Updates Needed Source: https://github.com/microsoft/beachball/blob/main/docs/cli/migrate.md This output indicates that your current Beachball configuration is already compatible with v3 and no manual updates are required. ```bash No config updates are needed for v3. ``` -------------------------------- ### Configure Repository URL in package.json Source: https://github.com/microsoft/beachball/blob/main/docs/overview/installation.md Set the repository URL in your root package.json. This helps Beachball determine the remote to compare against for detecting changes. ```json { "repository": { "type": "git", "url": "https://github.com/your-org-name/your-repo-name.git" } } ``` -------------------------------- ### Package-specific Commands Source: https://github.com/microsoft/beachball/blob/main/AGENTS.md These commands are run within an individual package directory (e.g., `cd packages/`). Prefer these scripts over running binaries directly. Use `yarn run -T` if a binary like `jest` must be executed. ```shell yarn build yarn test yarn test yarn test:all yarn test:unit yarn test:func yarn test:e2e yarn lint yarn update-snapshots ``` -------------------------------- ### Individual Package Single Test File Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to run a single test file within an individual package, wrapping Jest. Navigate into the package directory first. ```bash yarn test ``` -------------------------------- ### Check for Change Files Source: https://github.com/microsoft/beachball/blob/main/packages/beachball/README.md Use this command to verify if a change file is needed for the current branch. ```bash beachball check ``` -------------------------------- ### Run `beachball bump` Source: https://github.com/microsoft/beachball/blob/main/docs/cli/bump.md Execute the `bump` command to locally update versions and generate changelogs. This command affects local files only. ```bash $ beachball bump ``` -------------------------------- ### Top-level Monorepo Test Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to run all tests across the monorepo from the top level. Do not use for specific tests. ```bash yarn test ``` -------------------------------- ### Configure Beachball Scripts in package.json Source: https://github.com/microsoft/beachball/blob/main/docs/overview/installation.md Add scripts to your package.json to easily run Beachball commands for managing changes, checking them, and releasing. ```json { "scripts": { "change": "beachball change", "checkchange": "beachball check", "release": "beachball publish" } } ``` -------------------------------- ### Publish Changes with Custom Registry and Tag Source: https://github.com/microsoft/beachball/blob/main/packages/beachball/README.md Publishes package updates to npm, using a specified registry and npm dist-tag. This command also handles bumping versions and generating changelogs. ```bash beachball publish -r http://localhost:4873 -t beta ``` -------------------------------- ### Beachball Package E2E Tests Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to run only the end-to-end tests for the `beachball` package. Navigate into the `beachball` package directory first. ```bash yarn test:e2e ``` -------------------------------- ### Top-level Monorepo Format Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to format code across the monorepo from the top level. ```bash yarn format ``` -------------------------------- ### Top-level Monorepo Lint Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to lint both code and dependencies from the top level of the monorepo. ```bash yarn lint ``` -------------------------------- ### Generate change files for all packages Source: https://github.com/microsoft/beachball/blob/main/docs/cli/change.md Generates change files for all packages, regardless of detected changes. Ideal for updates affecting build configurations or shared settings. ```bash beachball change --all --type patch --message 'update build output settings' ``` -------------------------------- ### Configuring Concurrency for Batching Source: https://github.com/microsoft/beachball/blob/main/actions/should-release/README.md When `batch: true` is used, it's essential to configure GitHub Actions `concurrency` to ensure only one build runs per branch. This prevents race conditions and ensures proper batching behavior. ```yaml concurrency: "${{ github.workflow }}-${{ github.ref }}" ``` -------------------------------- ### Configure beachball.json for publishing Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ci-integration.md Set registry options in the beachball configuration, which is used by both publish and sync commands for private feeds. ```json { "beachball": { "registry": "https://pkgs.dev.azure.com/some-org/_packaging/some-feed/npm/registry/" } } ``` -------------------------------- ### Generate Beachball Change File Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command before creating a PR to generate a Beachball change file. This is a required step for PRs. ```bash /beachball-change-files ``` -------------------------------- ### Interactive prompt for change type Source: https://github.com/microsoft/beachball/blob/main/docs/cli/change.md Prompts for the change type (Patch, Minor, None, Major) based on semantic versioning. Choose 'None' if the change does not affect the published package. ```bash Please describe the changes for: some-pkg ? Change type › - Use arrow-keys. Return to submit. Patch - bug fixes; no backwards incompatible changes. Minor - small feature; backwards compatible changes. None - this change does not affect the published package in any way. Major - major feature; breaking changes. ``` -------------------------------- ### Interactive prompt for change description Source: https://github.com/microsoft/beachball/blob/main/docs/cli/change.md Prompts for a description of the changes, which will be used in the changelog. Recent commit messages can be selected. ```bash Please describe the changes for: some-pkg ? Describe changes (type or choose one) › adding a new file ``` -------------------------------- ### Run `beachball check` Source: https://github.com/microsoft/beachball/blob/main/docs/cli/check.md Execute the `beachball check` command to enforce change file inclusion and validate configurations. This command helps ensure all changes are captured and affect semver appropriately. ```bash $ beachball check ``` -------------------------------- ### Beachball Package Functional Tests Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to run only the functional tests for the `beachball` package. Navigate into the `beachball` package directory first. ```bash yarn test:func ``` -------------------------------- ### Generate change files for specific packages Source: https://github.com/microsoft/beachball/blob/main/docs/cli/change.md Generates change files for specified packages, overriding existing ones if necessary. Use `--message` and `--type` for further customization. ```bash beachball change --package foo --package bar ``` -------------------------------- ### Basic Beachball Configuration Structure Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/large-repos.md This is the basic structure for a beachball.config.js file. It uses JSDoc for type hinting and exports a partial RepoOptions object. ```javascript /** @type {Partial} */ const config = { // your options }; module.exports = config; ``` -------------------------------- ### Generate Change File with Specific Type and Message Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/change-files.md How to specify the change type and message directly on the command line when generating a change file using npm or yarn. ```bash # for npm $ npm run change -- --type minor --message "Upgrading React to 16.8.x to use hooks" # for yarn $ yarn change --type minor --message "Upgrading React to 16.8.x to use hooks" ``` -------------------------------- ### Configure Package Scope with Glob Patterns Source: https://github.com/microsoft/beachball/blob/main/docs/overview/configuration.md Use the 'scope' option to limit Beachball to specific packages within a monorepo. Patterns are relative to the monorepo root and support negation. ```json // in beachball.config.js or root package.json "beachball" { "scope": ["packages/foo/*", "!packages/foo/bar"] } ``` -------------------------------- ### Top-level Monorepo Update Snapshots Command Source: https://github.com/microsoft/beachball/blob/main/CLAUDE.md Use this command to update snapshots across the monorepo from the top level. ```bash yarn update-snapshots ``` -------------------------------- ### Enable Unique Changelog Filenames Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/large-repos.md Enable `changelog.uniqueFilenames` to add a suffix to changelog filenames based on the package name's hash, which can improve git performance. Existing files will be renamed upon initial enablement. ```javascript const config = { changelog: { uniqueFilenames: true }, }; ``` -------------------------------- ### Specify Target Branch with Remote for Internal Repos Source: https://github.com/microsoft/beachball/blob/main/docs/overview/configuration.md For internal repositories where all contributors use a single remote, specify the remote name as part of the 'branch' setting (e.g., 'origin/main'). ```json // in beachball.config.js or root package.json "beachball" { "branch": "origin/main" } ``` -------------------------------- ### Set npm Registry Read Concurrency Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/large-repos.md Increase the `npmReadConcurrency` option to speed up fetching version information from the npm registry for many packages. The default is 5. ```javascript const config = { npmReadConcurrency: 10, }; ``` -------------------------------- ### Set Git Credentials in Azure Pipelines Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ci-integration.md Configures Git user name, email, and remote URL with a PAT for publishing from Azure Pipelines. The REPO_PAT variable is sourced from a variable group named 'Beachball secrets'. ```yaml variables: - group: Beachball secrets pool: vmImage: ubuntu-latest steps: # ... Other steps to set up repo and prepare for publishing (install, build, test, etc) ... # Set the name, email, and URL with PAT (use Windows variable syntax if needed) - script: | git config user.name "someone" git config user.email "someone@example.com" git remote set-url origin "https://$REPO_PAT@github.com/your-org/your-repo" name: Set git credentials env: REPO_PAT: $(REPO_PAT) ``` -------------------------------- ### Set Git user information for commits Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/ci-integration.md Ensure Git user name and email are configured in your CI pipeline before running beachball to avoid commit rejections. ```bash git config user.name "someone" git config user.email "someone@example.com" ``` -------------------------------- ### Limit Number of Versions in Changelog Source: https://github.com/microsoft/beachball/blob/main/docs/concepts/large-repos.md Use `changelog.maxVersions` to limit the number of versions included in each package's changelog, preventing indefinite history growth. Older versions remain in git history. ```javascript const config = { // You can experiment with values changelog: { maxVersions: 100 }, }; ```