Skip to content

Add repo fork --org functionality#3611

Merged
mislav merged 2 commits intotrunkfrom
g14a/forkRepo-to-org
May 10, 2021
Merged

Add repo fork --org functionality#3611
mislav merged 2 commits intotrunkfrom
g14a/forkRepo-to-org

Conversation

@mislav
Copy link
Contributor

@mislav mislav commented May 10, 2021

Fixes #1247
Supersedes #3608

@g14a
Copy link
Contributor

g14a commented May 10, 2021

@mislav thanks a lot for taking the time to cleanup as well as leave the review comments. I'm sure it would help me in the future❤️🙏

Copy link
Contributor

@samcoe samcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code looks good to me. One question, are there any new error states that arise from organization permissions that we need to handle on our end? I expect that if the user does not have permission to create a repo inside the organization the API will return an unauthorized error.

@g14a
Copy link
Contributor

g14a commented May 10, 2021

The code looks good to me. One question, are there any new error states that arise from organization permissions that we need to handle on our end? I expect that if the user does not have permission to create a repo inside the organization the API will return an unauthorized error.

@samcoe we needn't handle any more error states, the API returns a 401 directly to the console via the usual error handling with the message Must have admin rights to the repository.

@mislav
Copy link
Contributor Author

mislav commented May 10, 2021

@samcoe: @g14a actually added more specialized error handling, but I've removed it for the sake of simplicity and trusting that the backend will respond with a descriptive enough error. If that proves not to be the case, I suggest that we make a followup change in the future, but right now it feels early.

@mislav mislav merged commit 3cbd5b4 into trunk May 10, 2021
@mislav mislav deleted the g14a/forkRepo-to-org branch May 10, 2021 15:09
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 repo fork cannot fork to org

4 participants