Skip to content

#2358: Automated IDEasy project board assigning - #2392

Open
samuelkos17 wants to merge 2 commits into
devonfw:mainfrom
samuelkos17:feature/2358-overhaul-ideasy-project-board-review-assigning
Open

#2358: Automated IDEasy project board assigning#2392
samuelkos17 wants to merge 2 commits into
devonfw:mainfrom
samuelkos17:feature/2358-overhaul-ideasy-project-board-review-assigning

Conversation

@samuelkos17

@samuelkos17 samuelkos17 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2358

Implemented changes:

  • Added auto-(un-)assigning logic for PRs that are being team reviewed. The intented functionality works like this:
# --- trigger ----------------------------------------------------------------
# runs: every 10 minutes (schedule) or manually (workflow_dispatch, dry_run option)

# --- decide mode -------------------------------------------------------------
APPLY  = (manual run with dry_run = false)
      or (repo variable RECONCILE_APPLY == "true")
dryRun = not APPLY                       # default (and cron): report only

# --- discover board ----------------------------------------------------------
board = find board titled BOARD_TITLE in account GH_ACCOUNT
        (looked up as USER account first, then ORGANIZATION;
         "not found" is tolerated, abort only if missing in both)
if board not found: abort the run

reviewerField = find the "Team Reviewer" TEXT field on the board
if reviewerField missing:
    warn once, continue WITHOUT field reads/writes   # inference-only mode

# --- load cards ----------------------------------------------------------------
for each item on the board (paginated):
    if item is not a PullRequest:                 skip
    if PR is merged or closed:                    skip
    if PR author is a bot (dependabot, *[bot]):   skip
    record: number, author, assignees,
            column    = value of the "Status" field,
            reviewer  = value of the "Team Reviewer" field ("" if unset),
            takeover  = PR carries the "takeover" label

# --- reconcile each card -------------------------------------------------------
for each card:
    if card.takeover:
        log "takeover: assignees left as-is"
        continue                                  # fully exempt

    if card.column == "Team Review":
        # the Team Reviewer field is the source of truth:
        if reviewer field is set to R:
            target = R                             # field wins, re-assigns if needed
        else if exactly ONE non-author is assigned:
            target = that person
            fillField = that person                # auto-fill the field (the record)
        else if NO non-author is assigned:
            target = author                        # nobody reviewed yet, keep author
        else:                                      # several non-authors: ambiguous
            target = author
            warn "multiple reviewers; kept author"

    else if card.column in { "🏗 In progress", "👀 In review" }:
        target = author
        if author is not assigned:
            warn "author missing; kept author"
            suggest "add the takeover label if someone took over"

    else:                                          # 🆕 New / Research / Refinement / ✅ Done
        continue                                   # unmanaged, counted as skipped

    # --- apply the single-owner outcome --------------------------------------
    toAdd    = [target] if target not in current assignees
    toRemove = everyone in current assignees except target
    if toAdd and toRemove are empty and no fillField: continue   # already conforming

    log planned change (assignees before -> after)

    if not dryRun:
        1. ADD the target                          # first, so the card never
        if the add failed: skip the removals       # ends up with zero assignees
        2. REMOVE the others (one DELETE each)
        3. if fillField set: write the Team Reviewer field
           (a failed field write only costs a re-inference on the next run)

# --- report ---------------------------------------------------------------------
log summary: cards / changed / skipped / takeovers / fieldWrites / mode

And the overview for each column looks like this:

Board column (Status) Class Desired assignee Team Reviewer field
🆕 New Unmanaged untouched untouched
Research Unmanaged untouched untouched
Refinement Unmanaged untouched untouched
🏗 In progress Author-only the PR author only kept, never clobbered
👀 In review Author-only the PR author only kept, never clobbered
Team Review Team review the reviewer (from the field) source of truth; auto-filled when empty
✅ Done Unmanaged untouched untouched

When merged this workflow won't work instantly, it first just performs DRY-RUNS to make sure that everything works as intended. To make it work we need to do the following things:

  • Add a Team Reviewer field to the project board
  • Add a label called "takeover" to the repo. PRs that have that label will be ignored.
  • If we want to let the workflow really change the assignees and not just dry-run then we need to add a new repository variable with the following values: Name: RECONCILE_APPLY, Value: true

Testing instructions

Please add conscise, understandable instructions on how a reviewer can test/verify the functionality of your contribution here:

  1. I don't know how to test this, but I tested it in my fork and it worked. However to ensure that we won't break anything the workflow first only does dry runs.

Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat and not feature/921 fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summaries what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed, you have updated our LICENSE.asciidoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@github-project-automation github-project-automation Bot moved this to 🆕 New in IDEasy board Aug 31, 2026
@samuelkos17 samuelkos17 added workflow GitHub actions (CI,CD,update urls/CVEs) enhancement New feature or request internal Nothing to be added to CHANGELOG, only internal story labels Aug 31, 2026
@samuelkos17 samuelkos17 moved this from 🆕 New to Team Review in IDEasy board Aug 31, 2026
@coveralls

coveralls commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 33380517750

Coverage remained the same at 73.628%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 18360
Covered Lines: 14130
Line Coverage: 76.96%
Relevant Branches: 8134
Covered Branches: 5377
Branch Coverage: 66.11%
Branches in Coverage %: Yes
Coverage Strength: 3.28 hits per line

💛 - Coveralls

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

Labels

enhancement New feature or request internal Nothing to be added to CHANGELOG, only internal story workflow GitHub actions (CI,CD,update urls/CVEs)

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Overhaul IDEasy project board review assigning

2 participants