Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-1993

Automatically close PRs targeting closed branches

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • None
    • admin
    • None

      As more projects are moving to branch based tracking of different releases, instead of fork based, it would be nice if we could more actively discourage users from opening PRs against the wrong branches. A bot could automatically close PRs targeting branches for GA'd releases.

      In GitHub, we may be able to look for certain attributes on the branch, like a branch protection rule with "lock branch" set to true. We could also have a regex configuration for locked branches in the bot, but it would be preferable to only needing to configure this in the forge. On GitLab I don't think there is any reasonable server side configuration to rely on, so we would have to fall back on bot configuration anyway.

      To avoid races, I think this would have to go in the PR bot. It seems we will at least need a bot side configuration, but we also need to investigate if there is a GitHub branch config we can look for in addition to this. It could also be that locking a branch in github prevents PRs already. That needs to be investigated.

            Unassigned Unassigned
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: