I'm using Forge App for Forking Repository across workspace, but it is not working.

Shipra Kumari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 9, 2024

 

I'm using Forge App for Forking Repository across workspace, all the permissions and required scopes are provided to the Forge App. Still whenever we try to Fork Repo from a different workspace (forking a public repo) through Forge app, getting issues.

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 10, 2024

Hello @Shipra Kumari ,

and welcome to the Community!

I would like to clarify a few questions first so we can narrow down the issue:

  • What are the scopes currently configured in your Forge App ?
  • In your Forge App, are you authenticating the API call to create a fork using .asApp() or .asUser() ?
  • Does the forking work when you try to fork a repository in the same workspace where the forge app is installed? 
  • Does the forking only fail when forking from a different workspace?
  • Could you confirm if the repository in the external workspace is configured to allow forks? You can check that by navigating to the repository in the UI and checking if the Fork options are shown in the UI.

This additional information we'll help us on finding what might be causing this error.

Thank you, @Shipra Kumari !

Patrik S

Shipra Kumari
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 12, 2024

Hi @Patrik S ,
Please find the additional info as requested

  • What are the scopes currently configured in your Forge App ?
    • read:repository:bitbucket
    • write:repository:bitbucket
    • admin:repository:bitbucket
    • read:pullrequest:bitbucket
    • write:pullrequest:bitbucket
    • read:project:bitbucket
    • admin:project:bitbucket
    • read:workspace:bitbucket
  • read:user:bitbucketIn your Forge App, are you authenticating the API call to create a fork using .asApp() or .asUser() ?

          We are authenticating the API call to create the fork using .asApp().

  • Does the forking work when you try to fork a repository in the same workspace where the forge app is installed? 

          Yes, the forking works when we fork a repository in the same workspace.

  • Does the forking only fail when forking from a different workspace?

          Yes, the forking only fails when forking from a different workspace.

  • Could you confirm if the repository in the external workspace is configured to allow forks? You can check that by navigating to the repository in the UI and checking if the Fork options are shown in the UI.

         Yes, it is enabled.

Also the Forge app is installed in both the workspaces so that it can have permissions in both the workspaces.

Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 13, 2024

Hello @Shipra Kumari ,

Thanks for providing the additional information.

Upon confirmation with our engineering team, forge request tokens are linked to the workspace the app is installed in and where it was generated, so you can fork within the same workspace, as you confirmed to be working, but not from a different workspace (even if the app is installed in both).

Thank you, @Shipra Kumari !

Patrik S

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events