Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post returns 410 (Gone) when issues are turned off for destination repository #122

Open
pavog opened this issue Nov 19, 2018 · 7 comments
Open

Comments

@pavog
Copy link

pavog commented Nov 19, 2018

Hi, when I try to use this extension the following error is getting printed to my browser console:

https://api.github.com/repos/pavog/myrepo/issues 410 (Gone)

The github developer api describes the endpoint over here.

@johnmurphy01
Copy link
Contributor

Hi @pavog. That is coming directly from the Github api.

Can you provide more detail about what operation you are trying to perform? For example, are you trying to actually clone an issue or is this happening before then?

@pavog
Copy link
Author

pavog commented Nov 20, 2018

Hi, I found out that this is problem occurs only if issues are not enabled on my reporitory, which is the default for forked repositories, unfortunately.

Maybe you can add a check for this (if the issues are enabled in the repo settings) and display a proper waring / error message.

@johnmurphy01
Copy link
Contributor

Good find! I can probably do that but ideally if you're trying to clone to a repo that has issue creation disabled, it would be smarter of Kamino to enable issue creation via an API call. I'll put this in the backlog to either:

  • present a warning message letting the user know that the repo they are cloning to doesn't allow issue creation
  • automatically enable issue creation if disabled

@pavog
Copy link
Author

pavog commented Nov 20, 2018

Sounds good. Thanks!

@pavog pavog changed the title Post returns 410 (Gone) Post returns 410 (Gone) when issues are turned off for destination repository Nov 21, 2018
@johnmurphy01
Copy link
Contributor

Looks like you can PATCH the repository and enable issues by setting has_issues to true:
https://developer.github.com/v3/repos/#edit

If using Kamino, then I will make the assumption that issues need to be enabled for the repo. I will call the above endpoint and then cloning should be possible after the fact.

@johnmurphy01
Copy link
Contributor

@all-contributors please add @pavog for bug

@allcontributors
Copy link
Contributor

@johnmurphy01

I've put up a pull request to add @pavog! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants