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

Question: what happened to codecommit? #375

Closed
ghost opened this issue Feb 3, 2021 · 9 comments
Closed

Question: what happened to codecommit? #375

ghost opened this issue Feb 3, 2021 · 9 comments

Comments

@ghost
Copy link

ghost commented Feb 3, 2021

I would like to just list the content of an aws codecommit repository from R code. I can't seem to find anything that works. is there anything in paws that could achieve this?
Thank you

this https://paws-r.github.io/docs/codecommit/ looked the answer but then it does not seem to exist anymore ....

@adambanker
Copy link
Member

Thanks for submitting this issue! CodeCommit is not currently available from CRAN, but you can install it directly from this repository with the following command: devtools::install_github("paws-r/paws/cran/paws.developer.tools").

You can then use codecommit as follows:

## To initialize a service object
codecommit <- paws.developer.tools::codecommit()

## To view documentation
?paws.developer.tools::codecommit

It should be fully functional, but I have not used CodeCommit extensively, so it is possible there are bugs.

@ghost
Copy link
Author

ghost commented Feb 3, 2021

Thank you!
When I run the install_github, I get the following message:
Downloading GitHub repo paws-r/paws@master Error in utils::download.file(url, path, method = method, quiet = quiet, : cannot open URL 'https://api.github.com/repos/paws-r/paws/tarball/master'

@davidkretch
Copy link
Member

Seems like like it could be a network related issue. Are you able to download other files, e.g. download.file("https://github.com", "test.html")?

@ghost
Copy link
Author

ghost commented Feb 3, 2021

Thank you, I am able to download files, the example you provided worked fine. I am still getting the same message on the install_github command however. I tried something silly: if i paste https://api.github.com/repos/paws-r/paws/tarball/master into chrome, i get a 404: Not Found error.

@davidkretch
Copy link
Member

davidkretch commented Feb 3, 2021

I found an issue in the remotes repo about this problem. They state that the file download problem is likely due to a rate limit or some other problem, like bad proxy setup.

You may be able to get around it by changing the download.file download method with options(download.file.method = "libcurl").

Failing that you can manually download the repo (right click and save) and install it locally with devtools::install_local("paws/cran/paws.developer.tools"), assuming your working directory is the parent folder of the unzipped file.

@ghost
Copy link
Author

ghost commented Feb 3, 2021

Thank you! the manual download worked! Now on to interacting with codecommit .....

@davidkretch
Copy link
Member

Great. I have also not used this API, but my guess is that the get_folder API operation will get you a list of a repository's contents:

codecommit <- paws.developer.tools::codecommit()
codecommit$get_folder(
  repositoryName = "string",
  commitSpecifier = "string",
  folderPath = "string"
)

@davidkretch
Copy link
Member

Closing for now.

@davidkretch
Copy link
Member

FYI CodeCommit is now available in the version of paws on CRAN (0.1.12).

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

No branches or pull requests

2 participants