Skip to content

canon: support single-branch repositories #1

Open

Description

@sandrolonardi

What

Let canon run in a repository with one long-lived branch, usually main.

Why

Setup refuses a config where the integration and production branches are the same, so a repository with only main can't use the plugin. Many small projects work that way.

Approach

A first idea: allow branches.integration to be null. With no integration branch:

  • /canon:staging opens the pull request into main and stops at the button, the way /canon:production does. protect-merge already refuses a merge into production, so nothing merges without the owner.
  • /canon:production has nothing to release and says so.
  • protect-branch and protect-push guard main alone.
  • /canon:production loses its check for commits that skipped a pull request, which depends on merge commits into the integration branch.

Open question: is one branch a separate mode in /canon:setup, or just the same questions with "none" as an answer?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions