Skip to content

fix(bitbucket-pull-requests): use Backstage fetchApi for API calls and access bitbucket.proxyPath via config.d.ts - #6759

Merged
mbruhin merged 6 commits into
backstage:mainfrom
Shubhammete:main
Jan 7, 2026
Merged

mbruhin merged 6 commits into
backstage:mainfrom
Shubhammete:main

Conversation

@Shubhammete

@Shubhammete Shubhammete commented Jan 6, 2026 •

Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

This PR fixes an issue in the Bitbucket Pull Requests plugin where API calls were made using cross-fetch instead of Backstage’s fetchApi, causing authentication failures when using the Backstage proxy. Additionally, the bitbucket.proxyPath configuration was not being read from app-config.yaml. This PR exposes the bitbucket configuration to the frontend via config.d.ts, following the Backstage guide

What was changed

  • Replaced cross-fetch calls with fetchApi.fetch
    • Ensures proxy authentication headers are automatically applied to avoid auth error
  • Exposed the bitbucket config to the frontend so the plugin can read bitbucket.proxyPath from app-config.yaml
    • Allows custom proxy paths (e.g. /bitbucket-prs/api) to work correctly

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

Fixes #6367

…d access bitbucket.proxyPath via config.d.ts

Signed-off-by: Shubhammete <[email protected]>
@Shubhammete
Shubhammete requested review from a team and mbruhin as code owners January 6, 2026 19:44
@Shubhammete
Shubhammete requested review from 04kash and removed request for a team January 6, 2026 19:44
@backstage-goalie

backstage-goalie Bot commented Jan 6, 2026 •

Copy link
Copy Markdown
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-bitbucket-pull-requests workspaces/bitbucket-pull-requests/plugins/bitbucket-pull-requests patch v3.0.0

…d access bitbucket.proxyPath via config.d.ts

Signed-off-by: Shubhammete <[email protected]>
…d access bitbucket.proxyPath via config.d.ts

Signed-off-by: Shubhammete <[email protected]>

@awanlin awanlin 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.

Thanks for the contribution @Shubhammete, left a pair of small comments. 👍

* Proxy path for BitBucket API requests
* @visibility frontend
*/

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.

Can we remove this space here, please?

@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-bitbucket-pull-requests': minor

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.

Suggested change
'@backstage-community/plugin-bitbucket-pull-requests': minor
'@backstage-community/plugin-bitbucket-pull-requests': patch

The behaviour isn't changing and your actually fixing things so patch is fine for this 👍

@Shubhammete

Copy link
Copy Markdown
Contributor Author

Thanks for the review @awanlin! 🙌
The requested changes have been made in the latest commit. Please let me know if anything else is needed.

@awanlin awanlin 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.

Thanks, approving but leaving this to @mbruhin to review and merge as the plugin owner.

@mbruhin
mbruhin merged commit d1c665e into backstage:main Jan 7, 2026
fjudith pushed a commit to alithya-oss/community-plugins that referenced this pull request Feb 19, 2026
…d access bitbucket.proxyPath via config.d.ts (backstage#6759)

* fix(bitbucket-pull-requests): use Backstage fetchApi for API calls and access bitbucket.proxyPath via config.d.ts

Signed-off-by: Shubhammete <[email protected]>

* fix(bitbucket-pull-requests): use Backstage fetchApi for API calls and access bitbucket.proxyPath via config.d.ts

Signed-off-by: Shubhammete <[email protected]>

* fix(bitbucket-pull-requests): use Backstage fetchApi for API calls and access bitbucket.proxyPath via config.d.ts

Signed-off-by: Shubhammete <[email protected]>

* fix(bitbucket-pull-requests): use Backstage fetchApi for API calls and access bitbucket.proxyPath via config.d.ts

Signed-off-by: Shubhammete <[email protected]>

---------

Signed-off-by: Shubhammete <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Bitbucket-Pull-Requests: Not using backstage fetchApi

4 participants