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

Connecting site by git remote url not working for private repos #258

Closed
verythorough opened this issue Feb 23, 2019 · 5 comments · Fixed by #1899
Closed

Connecting site by git remote url not working for private repos #258

verythorough opened this issue Feb 23, 2019 · 5 comments · Fixed by #1899
Labels
area: command: link type: bug code to address defects in shipped code

Comments

@verythorough
Copy link
Contributor

- Do you want to request a feature or report a bug?
bug

- What is the current behavior?
When running netlify link to connect a local repo to an existing site, you have the option to find the matching site using the current git remote url:
use-current-remote

I've tested on several private and public repos now, and the public ones consistently work, and the private ones consistently fail to find a linked repo:
not-found

- If the current behavior is a bug, please provide the steps to reproduce.
In a local clone of a private repo, run netlify link, and choose the default option to find the site by remote.

- What is the expected behavior?
It finds the site(s) in all cases. :)

- Please mention your node.js, and operating system version.

Tried on multiple machines:
netlify-cli/2.8.0 win32-x64 node-v10.15.0
netlify-cli/2.8.0 darwin-x64 node-v10.15.0

@DavidWells
Copy link
Contributor

The API call needs ?filter=all. https://api.netlify.com/api/v1/sites?filter=all

Needs to get updated here:

const sites = await api.listSites()

@bcomnes does https://github.com/netlify/js-client support query params like this?

@bcomnes
Copy link
Contributor

bcomnes commented Feb 25, 2019

@DavidWells any parameter listed in the operations over at https://open-api.netlify.com/#/default/listSites will work if you pass them in as an object to the call

const sites = await api.listSites({
  name: 'whatever',
  filter: 'foo bar'
})

@DavidWells
Copy link
Contributor

Tried that here

const sites = await api.listSites()

const sites = await api.listSites({
   filter: 'all',
})

It pulls back more sites but not all if you have more than 100. Pagination params didn't seem to work

@bcomnes
Copy link
Contributor

bcomnes commented Mar 5, 2019

Yeah, still need to add netlify/js-client#39

@erezrokah erezrokah added the type: bug code to address defects in shipped code label Aug 20, 2020
@erezrokah
Copy link
Contributor

filter: all was done in #500.
Keeping this open until we sort pagination

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: command: link type: bug code to address defects in shipped code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants