Repository navigation
Conversation
Per-issue export and import errors were printed, but the commands still exited with status 0, so scripts and users could miss a failed sync. Count the errors (ignoring cancellation on pull) and return an error after the summary line.
Exporters report why they leave an issue alone (wrong origin, another repository, missing author token, ...), but "git bug bridge push" threw those reasons away and printed only "exported N issues". When every issue was skipped, nothing told the user why. With --verbose (-v), push prints one line per skip reason with the number of issues. The default output is unchanged, because in a normal push most issues are skipped simply for having nothing to send.
Bugs without any change by an identity holding a token were skipped without an export event, so "push --verbose" could not count them. Report them through core.SkipReasonNoTokenActor, which tells the two cases apart: an issue whose operations all carry the GitHub id is already in sync and counts as up to date, while one with local changes nobody can push is reported as skipped for lack of a token. Name the skip reasons so they read well in the push summary: "issue belongs to another GitHub repository (owner/project)" instead of "skipping issue from url:...", and "missing a token for the issue author". Use core.ReasonNothingExported for issues that needed no update.
Bugs without any change by an identity holding a token were skipped without an export event, so "push --verbose" could not count them. Report them through core.SkipReasonNoTokenActor, which reports issues already in sync with GitLab as up to date instead of skipped. Name the GitLab instance or project an issue belongs to in the skip reasons, align "missing a token for the issue author" with the other bridges, and use core.ReasonNothingExported for issues needing no update.
The comment says an issue whose author has no credentials is skipped, but exportBug also returned the lookup error. ExportAll then reported an export error and stopped, so one such issue aborted the whole push. Return nil after reporting the skip. Align the skip reasons with the other bridges so "push --verbose" groups them: core.SkipReasonNoTokenActor instead of "not an actor", one reason for all issues missing author credentials instead of one per user ID, and name the Jira project an issue belongs to.
Move the result reporting of push and pull into functions that read from an event channel, and test them with prepared events: the skip summary is hidden by default, --verbose groups the reasons in first-seen order without listing up-to-date issues, and errors make the command fail while cancellation does not.
mcepl
force-pushed
the
push-diagnostics
branch
from
October 5, 2026 11:50
5b3456d to
15b55a7
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
git bug bridge pushdrops the reasons exporters give for leaving an issue alone. When every issue is skipped, the only output isexported 0 issues with … bridge, and nothing says why. Push and pull also print per-issue errors but still exit with status 0, so scripts never see a failed sync.Changes
commands/bridge: exit non-zero when push or pull reports errors. Both commands count the error events (pull ignores cancellation) and return an error after the summary line.
commands/bridge: add
--verbosetobridge push. It prints one line per skip reason with the number of issues. The default output doesn't change, because in a normal push most issues are skipped simply for having nothing to send. Illustrative output (numbers made up):bridge/github, bridge/gitlab: issues without any change by an identity holding a token were skipped without any export event, so push couldn't count them. They are now reported under one shared reason. The reasons also name the repository, instance or project an issue belongs to, replacing messages like
skipping issue from url:....bridge/jira: an issue whose author has no credentials is now skipped, as the code comment already said. Before,
exportBugalso returned the lookup error, so one such issue stopped the whole push. The skip reasons now match the other bridges.core.ReasonNothingExportedandcore.ReasonNoTokenActorare shared constants, so push no longer compares against a string literal.Testing
go test ./...passes. I couldn't run the GitHub, GitLab and Jira export paths, since their tests need real accounts; those commits are covered only by compiling and the existing tests. I checked--verboseand the exit status by hand on a Gitea bridge that builds on this branch (#1628).The PR appears safe to merge based on the reviewed changes.
Summary
The PR adds verbose push skip summaries and makes push and pull return an error when issue-level operations fail. It also gives exporters shared skip reasons and checks foreign-issue metadata before reporting a missing token. No new actionable issue was established in the changes since the previous review.
Reviews (3) · Last reviewed commit: "bridge: explain foreign issues before ch..."