Skip to content

Fix native integration to pass cookies/credentials for "Extensions" info graphql request

Created by: erzhtor

Closes https://github.com/sourcegraph/sourcegraph/issues/32599.

Description

This PR:

  • Fixes native integration (aka @sourcegraph/code-host-integration) not passing cookies/credentials when fetching Extensions info via GraphQL API.

Test plan

  1. Check browser extension works correctly/as previsously
  2. Check native integration works correctly
    1. Build native integration npm package locally: yarn --cwd client/browser build
    2. Setup GitLab locally using gdk
    3. Link a local npm package to gitlab:
      1. cd client/browser/build/integration && yarn link
      2. `cd to /gitlab && yarn link @sourcegraph/code-host-integration)
    4. Restart GitLab gdk restart
    5. Run sourcegraph locally and configure native integration w/ local GitLab`
    6. Open any synced w/ local Sourcegraph repository in local GitLab and check hovers work as expected and no errors in DevTools/Network tab

Screenshots

Before After
image image
image image

Before merging

  • Test on different code hosts (if applicable)

    • GitHub
    • Gitlab
    • GitHub Enterprise
    • Refined GitHub
    • Phabricator
    • Phabricator integration
    • Bitbucket
    • Bitbucket integration
  • Test on different browsers (if applicable)

    • Chrome
    • Firefox
    • Safari
  • Add change log message to client/browser/CHANGELOG.md, under "Unreleased" section. (if applicable)

App preview:

Merge request reports

Loading