Skip to content

Fix GitLab migration permissions documentation link - #1614

Open
brianaj with Copilot wants to merge 3 commits into
mainfrom
copilot/change-insufficient-permissions-link
Open

brianaj with Copilot wants to merge 3 commits into
mainfrom
copilot/change-insufficient-permissions-link

Conversation

Copilot AI commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

GitLab-to-GitHub migrations displayed GitHub-to-GitHub PAT guidance when migration-source creation lacked permissions. Route gl2gh errors to the GitLab-specific access documentation while retaining existing guidance elsewhere.

  • Permissions guidance

    • Add a GitLab-specific insufficient-permissions message.
    • Use it only from the gl2gh migration-source error path.
  • Coverage

    • Assert the GitLab documentation URL and unchanged default message.
  • Release notes

    • Document the corrected error guidance.
  • Did you write/update appropriate tests

  • Release notes updated (if appropriate)

  • Appropriate logging output

  • Issue linked

  • Docs updated (or issue created)

  • New package licenses are added to ThirdPartyNotices.txt (if applicable)

Co-authored-by: brianaj <2413532+brianaj@users.noreply.github.com>
Copilot AI changed the title [WIP] Update gh gl2gh link for insufficient permissions Fix GitLab migration permissions documentation link Sep 18, 2026
Copilot AI requested a review from brianaj September 18, 2026 17:01
@brianaj
brianaj marked this pull request as ready for review September 18, 2026 17:03
Copilot AI balanced review requested due to automatic review settings September 18, 2026 17:03

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.

🟡 Changes recommended

The changed gl2gh error-routing path lacks a regression test that verifies the final user-facing message.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Corrects #1611 by routing gl2gh permission failures to GitLab-specific access guidance.

Changes:

  • Adds GitLab-specific permission messaging.
  • Preserves default migration guidance.
  • Adds generator coverage and release notes.
File summaries
File Description
src/Octoshift/InsufficientPermissionsMessageGenerator.cs Adds GitLab-specific documentation support.
src/gl2gh/Commands/MigrateRepo/MigrateRepoCommandHandler.cs Uses GitLab guidance for migration-source failures.
src/OctoshiftCLI.Tests/InsufficientPermissionsMessageGeneratorTest.cs Tests both generated messages.
RELEASENOTES.md Documents the correction.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

catch (OctoshiftCliException ex) when (ex.Message.Contains("not have the correct permissions to execute"))
{
var insufficientPermissionsMessage = InsufficientPermissionsMessageGenerator.Generate(args.GithubOrg);
var insufficientPermissionsMessage = InsufficientPermissionsMessageGenerator.GenerateForGitlab(args.GithubOrg);
@brianaj

brianaj commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

Co-authored-by: brianaj <2413532+brianaj@users.noreply.github.com>

Copilot AI commented Sep 18, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the s...

Added a gl2gh handler regression test (Throws_Decorated_Error_With_Gitlab_Access_Documentation_When_Create_Migration_Source_Fails_With_Permissions_Error) that makes CreateGitlabMigrationSource throw the permissions exception and asserts the final message contains the GitLab access URL, in commit 55b9812.

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.

🟢 Approval recommended

The targeted behavior is correct, isolated, documented, and covered by unit tests.

Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

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.

gh-gl2gh link in case of insufficient permissions needs to be changed

4 participants