Files
autogits/workflow-pr
Adam Majer c5db1c83a7 PR: detect and rebase project git commits
When project is advanced, and we have other package changes
to same project, the project git changes need to be rebased. The
simplest way of doing this is to skip all the submodule conflicts
and re-create them. This allows the submodules changes to be
mergeable again.
2025-07-15 19:08:05 +02:00
..
2025-06-12 23:51:04 +02:00
2024-09-13 14:58:10 +02:00
2024-09-27 17:58:09 +02:00
2025-06-12 23:51:04 +02:00
wip
2025-05-16 17:57:02 +02:00
2025-06-12 23:51:04 +02:00
2025-06-12 23:51:04 +02:00
2025-06-24 14:33:06 +02:00
2025-06-12 23:51:04 +02:00
2025-07-09 17:33:44 +02:00

Workflow-PR bot

Keeps ProjectGit PR in-sync with a PackageGit PR

Areas of Responsibility

  • Detects a PackageGit PR creation against a package and creates a coresponsing PR against the ProjectGit
  • When a PackageGit PR is updated, the corresponding PR against the ProjectGit is updated
  • Stores reference to the PackageGit PR in the headers of the ProjectGit PR comments, for later reference
    • this allows ProjectGit PR to be merged to seperated later (via another tool, for example)
  • Initiates all staging workflows via review requests

Target Usage

Any project (devel, etc) that accepts PR

Config file

JSON

  • Workflows: "pr" -- pr workflow enabled
  • Organization: organization that holds all the packages
  • Branch: branch updated in repo's
  • GitProjectName: package in above org, or org/package for PrjGit
  • Reviewers: accounts associated with mandatory reviews for PrjGit. Can trigger additional review requests for PrjGit or associated PkgGit repos. Only when all reviews are satisfied, will the PrjGit PR be merged. See Reviewers below.
  • ManualMergeOnly: (true, false) only merge if "merge ok" comment/review by package or project maintainers or reviewers
  • ManualMergeProject: (true, false) only merge if "merge ok" by project maintainers or reviewers

example:

[
 {
    "Workflows": ["pr", "direct"],
    "Organization": "autogits",
    "GitProjectName": "HiddenPrj",
    "Branch": "hidden",
    "Reviewers": []
 },
 ...
]

Reviewers

Reviews is a list of accounts that need to review package and/or project. They have specific syntax

[~][*|-|+]username

General prefix of ~ indicates advisory reviewer. They will be requested, but ignored otherwise.

Other prefixes indicate project or package association of the reviewer:

  • * indicates project and package
  • - indicates project-only reviewer
  • + indicates package-only reviewer

+ is implied. For example

`[foo, -bar, ~*moo]`

results in

  • foo -> package reviews
  • bar -> project reviews
  • moo -> package and project reviews, but ignored

Maintainership

Maintainership information is defined per project. For reviews, package maintainers are coalesced with project maintainers. A review by any of the maintainers is acceptable.

example:

{
    "package1": [ "reviewer", "reviewer2"],
    "package2": [],

    // "project" maintainer
    "": ["reviewer3", "reviewer4"]
}