intuit/auto

repository·main·Indexed 25 days ago

https://github.com/intuit/auto

An automated release tool that uses pull request labels to manage semantic versioning, changelog generation, and publishing across various package managers. It includes a CLI for configuration and release workflows (such as the shipit command), a Node.js API via @auto-it/core, and a plugin system supporting Homebrew, Chrome Web Store, CocoaPods, and All Contributors.

Tokens
63.4K
Snippets
186
Records
414
Agent score
78%

What's inside auto

  1. Overview of Auto

    main

    Auto is a tool designed to automate software releases based on semantic version labels applied to pull requests. It is optimized for continuous integration (CI) environments but can also be run locally.

    Key Release Features:

    • Calculates semantic version bumps from PRs.
    • Supports skipping releases using the skip-release label.
    • Enables canary releases from PRs or locally.
    • Generates changelogs with support for fancy headers, authors, and monorepo package association.
    • Allows creating new changelog sections via labels.
    • Generates GitHub releases.

    Pull Request Interaction Features:

    • Retrieves labels for a PR.
    • Sets PR status.
    • Validates that a PR has a SemVer label.
    • Comments on PRs using markdown.
    • Updates PR bodies with contextual build metadata.
  2. Overview of Auto's release and PR automation

    main

    Auto is a tool designed to automate release workflows and pull request interactions, primarily intended for use in Continuous Integration (CI) environments, though it can also be run locally.

    Release Automation Features:

    • Calculate semantic version (semver) bumps based on Pull Requests.
    • Publish canaries (test versions) from PRs or locally.
    • Generate changelogs with headers, authors, and detailed release notes.
    • Create GitHub releases.

    Pull Request Interaction Features:

    • Retrieve labels for a PR.
    • Set the status of a PR.
    • Comment on a PR using Markdown.
    • Update PR bodies with contextual build metadata.
  3. Overview of auto Tool APIs

    main

    The auto CLI provides several categories of tools to automate repository management, including setup, publishing, PR interaction, and specialized plugin support.

    Setup Commands

    • auto init: Initialize the tool in your repository.
    • auto create-labels: Automatically create labels in your repository.
    • auto info: Display information about the current setup.

    Publishing Commands

    Automate the release lifecycle with commands like auto version, auto changelog, auto release, auto shipit, auto latest, auto next, and auto canary.

    PR Interaction Commands

    Manage Pull Requests automatically using auto label, auto pr-status, auto pr-check, auto pr-body, and auto comment.

    Plugin Support

    auto supports various plugin types:

    • Package Manager Plugins: Specialized support for Homebrew, Chrome Web Store, CocoaPods, Crates, Docker, Gem, Git Tag, Gradle, Maven, NPM, sbt, and VSCode.
    • Functionality Plugins: Extends capabilities for services like Slack, Jira, Microsoft Teams, GitHub Pages, and logic like Conventional Commits or Omit Commits.
  4. Use @auto-it/bot-list to ignore specific bots

    main
    The @auto-it/bot-list package provides a centralized list of bots that auto and its plugins should ignore. This is useful for preventing automated tools from triggering certain workflows or being processed by auto's automation logic.
  5. Customize project labels and changelog sections

    main

    Use the labels array to define how GitHub labels trigger releases and how they appear in the changelog.

    Key properties for a label:

    • name: The label text. Defaults to the key if omitted.
    • releaseType: The type of release to trigger (major, minor, patch, skip, release, or none).
    • overwrite: If true, replaces the default label(s) associated with that releaseType (default: false).
    • changelogTitle: The title used for the section in the changelog.
    • description: Description for the label.
    • default: Marks this label as the default for unlabelled PRs.
    • color: The label color (supports TinyColor formats).

    Release Types:

    • skip: Will not create a release when merged, even if paired with other labels.
    • none: Will not create a release when merged. If paired with a SEMVER label, the release is NOT skipped.

    Changelog Logic: PRs are assigned to a section based on the matching label with the highest releaseType priority: major > minor > patch > others. If multiple labels of the same type exist, the one defined first in the config is used.

    {
      "noDefaultLabels": true,
      "labels": [
        {
          "name": "Version: Major",
          "changelogTitle": "The API has changed:",
          "description": "Add this label to a PR to create a major release",
          "color": "blue",
          "releaseType": "major"
        }
      ]
    }
  6. How the Git Tag Plugin works

    main

    The Git Tag Plugin manages project versions exclusively through Git tags rather than publishing to platforms like npm or Maven. It is useful when you do not need to release code to a specific package registry.

    Capabilities:

    1. Retrieves the last Git tag.
    2. Bumps the tag to a new version.
    3. Creates the new tag.
    4. Pushes the tag to GitHub.

    Limitations:

    • It does not publish to any specific platform.
    • It does not use platform-specific project information (such as author or repo from a package.json).
    • It does not support canary releases. For canary support, use the upload-assets plugin instead.