Skip to content
Snippets Groups Projects

[Part 1 for #issues/27922] Update 'repositoryRedirect' GraphQL API to get repository by its hashed name

Merged Administrator requested to merge erzhtor/secure-support-for-private-repos-on-cloud into main

Created by: erzhtor

Part 1 of https://github.com/sourcegraph/sourcegraph/issues/27922. Blocks https://github.com/sourcegraph/sourcegraph/pull/28621.

Description

This PR:

  • Adds SQL migration to add a new index
  • Updates repositoryRedirect GraphQL Schema API to get repository by its hashed name securely and without side-effects (like auto-cloning)

How to test

  • Run migration: sg run migration up
  • Start Sourcegraph in DotCom mode: sg start dotcom
  • Open GraphQL API Console Locally
  • Run the following query:
  repositoryRedirect(hashedName: "any-sha256-hashed-and-hex-encoded-repository-name") {
    name
    mirrorInfo {
      cloned
    }
  }
}

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading