Conversation
Render the nullable source archive observation in migration status, TUI details, and watch independently of target progress. Preserve raw JSON and existing lifecycle and refresh behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Decode migration.source_repository_archived and render unavailable when migration metadata or the observation is missing. Update status, watch, TUI, and raw-response fixtures without changing migration progress or refresh behavior. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: jeffsaracco <248182+jeffsaracco@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The implementation consistently handles true, false, missing, invalid, and refreshed archive observations without altering raw JSON behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Displays the API-reported source repository archive state consistently across migration status, watch, and TUI views.
Changes:
- Adds nullable archive-state decoding and shared rendering.
- Removes misleading lock-state output while preserving JSON.
- Expands tests and repairs lint workflow configuration.
| File | Description |
|---|---|
README.md |
Documents archive-state semantics. |
.github/workflows/lint.yaml |
Simplifies permissions and restores caching. |
internal/elmapi/migrations.go |
Decodes the archive-state field. |
internal/elmapi/migrations_test.go |
Tests decoding and invalid values. |
internal/render/migration.go |
Adds shared archive-state rendering. |
internal/render/migration_test.go |
Tests rendering and independence from progress. |
internal/cmd/migration/migration_test.go |
Tests status and JSON behavior. |
internal/cmd/migration/watch/view.go |
Displays archive state in watch output. |
internal/cmd/migration/watch/watch_test.go |
Tests watch display and refreshes. |
internal/tui/model_test.go |
Tests TUI display and refreshes. |
integration/cli_test.go |
Adds end-to-end status coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
Correct the source repository status wording in
migration status,migration watch, and TUI details. These views now display the reported archive state instead of describing the source repository as locked or unlocked.Tracking issue: github/migrations-vnext#7129
Changes
Source repository archived,Source repository not archived, orSource repository archive state unavailable, depending on the available data.--jsonoutput and existing migration and refresh behavior. No additional API requests are introduced.Lint-related changes
The lint job previously failed during action resolution, before checking Go code.
make lintcommand and repository-wide lint configuration are unchanged.requireassertions for prerequisite error checks, preventing misleading follow-on assertions after an unexpected result.dupwordsuppressions. The repeatedSourcetext is intentional: a section heading is followed by aSource repository ...line, not duplicate prose. The rule remains enabled elsewhere.Validation
Focused unit tests and built-CLI integration tests passed using local HTTP fixtures. Coverage includes archive-state decoding and display, missing data, refresh behavior, and JSON preservation.