Skip to content

bug: table display pipe formatting bug #20

Closed
@GrantBirki

Description

@GrantBirki

For some reason, when labels don't match any PRs, the MC (merge conflict) value is either displaying 32m0 (MC) or 2m0 (MC). I am not sure why this is the case and it is breaking table formatting (the pipes) due to this. See two outputs below.

The first shows correctly formatted tables and piples:

~/code/gh-combine
$ LOG_LEVEL=DEBUG go run cmd/gh-combine/main.go grantbirki/github-username-regex-ruby grantbirki/ruby-template grantbirki/auditor-action --labels dependenciesasdf
time=2025-04-14T17:31:55.384-07:00 level=DEBUG msg="starting gh-combine" version="dev (123abc) built at now\nhttps://github.com/github/gh-combine/releases/tag/dev"
⣻time=2025-04-14T17:31:55.511-07:00 level=DEBUG msg="Processing repository" repo=grantbirki/github-username-regex-ruby
⣯ Processing grantbirki/github-username-regex-rubytime=2025-04-14T17:31:55.788-07:00 level=DEBUG msg="Checking branch criteria" branch=combined-prs
time=2025-04-14T17:31:55.788-07:00 level=DEBUG msg="Branch is a combine branch, skipping match"
time=2025-04-14T17:31:55.788-07:00 level=DEBUG msg="Checking branch criteria" branch=dependabot/bundler/dev-ruby-dependencies-4eea0174aa
time=2025-04-14T17:31:55.788-07:00 level=DEBUG msg="No branch filters specified, passing match"
time=2025-04-14T17:31:55.788-07:00 level=DEBUG msg="Checking branch criteria" branch=dependabot/github_actions/github-actions-02c935407f
time=2025-04-14T17:31:55.788-07:00 level=DEBUG msg="No branch filters specified, passing match"
time=2025-04-14T17:31:55.788-07:00 level=DEBUG msg="Not enough PRs match criteria" repo=grantbirki/github-username-regex-ruby matched=0 required=2
time=2025-04-14T17:31:55.788-07:00 level=DEBUG msg="Processing repository" repo=grantbirki/ruby-template
⣻ Processing grantbirki/ruby-templatetime=2025-04-14T17:31:56.002-07:00 level=DEBUG msg="Checking branch criteria" branch=combined-prs
time=2025-04-14T17:31:56.002-07:00 level=DEBUG msg="Branch is a combine branch, skipping match"
time=2025-04-14T17:31:56.002-07:00 level=DEBUG msg="Checking branch criteria" branch=dependabot/bundler/dev-ruby-dependencies-e195325ea2
time=2025-04-14T17:31:56.002-07:00 level=DEBUG msg="No branch filters specified, passing match"
time=2025-04-14T17:31:56.002-07:00 level=DEBUG msg="Not enough PRs match criteria" repo=grantbirki/ruby-template matched=0 required=2
time=2025-04-14T17:31:56.002-07:00 level=DEBUG msg="Processing repository" repo=grantbirki/auditor-action
⡿ Processing grantbirki/auditor-actiontime=2025-04-14T17:31:56.171-07:00 level=DEBUG msg="Not enough PRs match criteria" repo=grantbirki/auditor-action matched=0 required=2
╭───────────────────────────────────────┬────────────────┬──────────────────────┬──────────────╮
│ Repository                            │   PRs Combined │ Skipped              │ Status       │
├───────────────────────────────────────┼────────────────┼──────────────────────┼──────────────┤
│ grantbirki/github-username-regex-ruby │              0 │ 32m0 (MC), 3 (DNM)      │ NOT ENOUGH   │
│ grantbirki/ruby-template              │              0 │ 2m0 (MC), 2 (DNM)      │ NOT ENOUGH   │
│ grantbirki/auditor-action             │              0 │ 0 (MC), 0 (DNM)      │ NO OPEN PRs  │
╰───────────────────────────────────────┴────────────────┴──────────────────────┴──────────────╯

╭───────────────┬───────────────┬───────────────────────┬───────────────╮
│ Repos         │ Combined PRs  │ Skipped               │ Total PRs     │
├───────────────┼───────────────┼───────────────────────┼───────────────┤
│ 3             │ 0             │ 0 (MC), 5 (DNM)       │ 0             │
╰───────────────┴───────────────┴───────────────────────┴───────────────╯

The second shows how the tables and pipes are broken, likely by these weird partly colorized numbers displaying the count of PRs with merge conflicts.

~/code/gh-combine
$ LOG_LEVEL=DEBUG go run cmd/gh-combine/main.go grantbirki/github-username-regex-ruby grantbirki/ruby-template grantbirki/auditor-action --labels dependencies
time=2025-04-14T17:32:03.020-07:00 level=DEBUG msg="starting gh-combine" version="dev (123abc) built at now\nhttps://github.com/github/gh-combine/releases/tag/dev"
⣻time=2025-04-14T17:32:03.144-07:00 level=DEBUG msg="Processing repository" repo=grantbirki/github-username-regex-ruby
⣷ Processing grantbirki/github-username-regex-rubytime=2025-04-14T17:32:03.485-07:00 level=DEBUG msg="Checking branch criteria" branch=combined-prs
time=2025-04-14T17:32:03.485-07:00 level=DEBUG msg="Branch is a combine branch, skipping match"
time=2025-04-14T17:32:03.485-07:00 level=DEBUG msg="Checking branch criteria" branch=dependabot/bundler/dev-ruby-dependencies-4eea0174aa
time=2025-04-14T17:32:03.485-07:00 level=DEBUG msg="No branch filters specified, passing match"
time=2025-04-14T17:32:03.485-07:00 level=DEBUG msg="Checking branch criteria" branch=dependabot/github_actions/github-actions-02c935407f
time=2025-04-14T17:32:03.485-07:00 level=DEBUG msg="No branch filters specified, passing match"
time=2025-04-14T17:32:03.485-07:00 level=DEBUG msg="Matched PRs" repo=grantbirki/github-username-regex-ruby count=2
⣾ Processing grantbirki/github-username-regex-rubytime=2025-04-14T17:32:04.027-07:00 level=DEBUG msg="Working branch not found, continuing" branch=combined-prs-working
⣽ Processing grantbirki/github-username-regex-rubytime=2025-04-14T17:32:05.525-07:00 level=DEBUG msg="Merged branch" branch=dependabot/bundler/dev-ruby-dependencies-4eea0174aa
⣽ Processing grantbirki/github-username-regex-rubytime=2025-04-14T17:32:06.054-07:00 level=DEBUG msg="Merged branch" branch=dependabot/github_actions/github-actions-02c935407f
⣾ Processing grantbirki/github-username-regex-rubytime=2025-04-14T17:32:07.958-07:00 level=DEBUG msg="Combined PRs" count=2 owner=grantbirki repo=github-username-regex-ruby
time=2025-04-14T17:32:07.958-07:00 level=DEBUG msg="Processing repository" repo=grantbirki/ruby-template
⣟ Processing grantbirki/ruby-templatetime=2025-04-14T17:32:08.242-07:00 level=DEBUG msg="Checking branch criteria" branch=combined-prs
time=2025-04-14T17:32:08.242-07:00 level=DEBUG msg="Branch is a combine branch, skipping match"
time=2025-04-14T17:32:08.242-07:00 level=DEBUG msg="Checking branch criteria" branch=dependabot/bundler/dev-ruby-dependencies-e195325ea2
time=2025-04-14T17:32:08.242-07:00 level=DEBUG msg="No branch filters specified, passing match"
time=2025-04-14T17:32:08.242-07:00 level=DEBUG msg="Not enough PRs match criteria" repo=grantbirki/ruby-template matched=1 required=2
time=2025-04-14T17:32:08.242-07:00 level=DEBUG msg="Processing repository" repo=grantbirki/auditor-action
⣾ Processing grantbirki/auditor-actiontime=2025-04-14T17:32:08.419-07:00 level=DEBUG msg="Not enough PRs match criteria" repo=grantbirki/auditor-action matched=0 required=2
╭───────────────────────────────────────┬────────────────┬──────────────────────┬──────────────╮
│ Repository                            │   PRs Combined │ Skipped              │ Status       │
├───────────────────────────────────────┼────────────────┼──────────────────────┼──────────────┤
│ grantbirki/github-username-regex-ruby │              2 │ 0 (MC), 1 (DNM)      │ OK           │
│ grantbirki/ruby-template              │              0 │ 0 (MC), 1 (DNM)      │ NOT ENOUGH   │
│ grantbirki/auditor-action             │              0 │ 0 (MC), 0 (DNM)      │ NO OPEN PRs  │
╰───────────────────────────────────────┴────────────────┴──────────────────────┴──────────────╯

╭───────────────┬───────────────┬───────────────────────┬───────────────╮
│ Repos         │ Combined PRs  │ Skipped               │ Total PRs     │
├───────────────┼───────────────┼───────────────────────┼───────────────┤
│ 3             │ 2             │ 0 (MC), 2 (DNM)       │ 1             │
╰───────────────┴───────────────┴───────────────────────┴───────────────╯

Links to Combined PRs:
- https://github.com/grantbirki/github-username-regex-ruby/pull/225

This issue needs to be resolved.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions