Skip to content

feat: add PENDING subResult status and pending-repositories output#204

Merged
joshjohanning merged 2 commits into
mainfrom
joshjohanning/add-pending-status
May 20, 2026
Merged

feat: add PENDING subResult status and pending-repositories output#204
joshjohanning merged 2 commits into
mainfrom
joshjohanning/add-pending-status

Conversation

@joshjohanning

Copy link
Copy Markdown
Owner

Resolves #183

Why

Repositories whose only "change" was an open sync PR already up-to-date (pr-up-to-date) were being counted under changed-repositories, which is misleading because nothing was actioned on that run — the PR just needs merging. This made the summary read "4 repos changed" when 3 of them were actually idle from previous runs.

What changed

  • New SubResultStatus.PENDING ('pending') emitted only when a sync helper returns syncStatus === 'pr-up-to-date'. Everything else (commits pushed, PRs created/updated, stale PRs closed, dry-run would-*) stays CHANGED.
  • New pending-repositories output and a 🔄 Pending row in the job summary table and header counts.
  • Repos with only PENDING sub-results are redistributed out of changed-repositories into pending-repositories. Mixed repos (real CHANGE + pr-up-to-date) still count as changed — bucket priority mirrors the existing failure-count logic Wuodan suggested: changed > pending > unchanged, with warning as an independent overlay.

Invariant: updated-repositories === changed + pending + unchanged.

Notes for reviewers

  • Applied at the 7 PR-syncing helpers (dependabot, gitignore, pr-template, workflow-files, copilot-instructions, codeowners, package-json) via a new statusForSync() helper so the rule stays in one place. Autolinks/environments don't go through PRs, so they're unaffected.
  • results JSON now includes 'pending' in subResults[].status — called out in the README. Consumers filtering by status === 'changed' won't see pr-up-to-date entries anymore (intentional).
  • Version bumped 2.9.62.10.0. Treated as a minor bump per the issue thread: the changed-repositories redistribution is the bug fix that motivated the change, and pending-repositories is purely additive.

Tests

npm run all passes (lint, 405 tests, coverage, ncc bundle). Added three new run-level tests covering: pure-pending classification + 🔄 Pending row, mixed-repo stays Changed, pending-repositories: '0' baseline.

Repos with an open sync PR already up-to-date (pr-up-to-date) are now
reported as pending instead of changed. Adds a new pending-repositories
output, separate 🔄 Pending row in the job summary, and redistributes
those repos out of changed-repositories (mixed repos with real changes
still count as changed).

Resolves #183

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 19, 2026 20:35
@joshjohanning joshjohanning changed the title Add PENDING subResult status and pending-repositories output feat: add PENDING subResult status and pending-repositories output May 19, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request introduces a new “pending merge” classification for repositories that only have an already-up-to-date sync PR (syncStatus === 'pr-up-to-date'), so they no longer inflate the changed-repositories count. It adds a new pending-repositories output, updates the job summary to display pending counts/rows, and documents the new semantics (including the new subResults[].status: 'pending' value).

Changes:

  • Added SubResultStatus.PENDING and centralized PR-sync status mapping via statusForSync() to emit pending only for pr-up-to-date.
  • Added pending-repositories output and updated the job summary to show Pending counts and a “🔄 Pending” status row.
  • Updated README/action metadata and added tests covering pure-pending, mixed (changed+pending), and baseline pending=0 scenarios.
Show a summary per file
File Description
src/index.js Adds PENDING sub-result status, pending repo classification/counting, new output, and summary/table updates.
README.md Documents the new pending-repositories output and the updated semantics (including subResults[].status: 'pending').
action.yml Adds the pending-repositories output and updates output descriptions to match new behavior.
__tests__/index.test.js Adds run-level tests to validate pending classification, mixed classification precedence, and pending output baseline.
package.json Bumps version to 2.10.0 for the behavior/output change.
package-lock.json Updates lockfile version field to align with the package.json bump.
badges/coverage.svg Updates coverage badge value after test changes.

Copilot's findings

  • Files reviewed: 5/7 changed files
  • Comments generated: 1

Comment thread src/index.js Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@joshjohanning joshjohanning merged commit b16da5b into main May 20, 2026
4 checks passed
@joshjohanning joshjohanning deleted the joshjohanning/add-pending-status branch May 20, 2026 14:06
@github-actions

Copy link
Copy Markdown

📦 Draft Release Created

A draft release v2.10.0 has been created for this PR.

🔗 View Draft Release

Next Steps

  • Review the release notes
  • Publish the release to make it permanent

This is an automated reminder from the publish-github-action workflow.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discussion: Add PENDING subResult status and pending-repositories output?

2 participants