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

API Completeness - Repositories - Content #150

Open
3 of 5 tasks
raghav710 opened this issue Mar 22, 2020 · 8 comments
Open
3 of 5 tasks

API Completeness - Repositories - Content #150

raghav710 opened this issue Mar 22, 2020 · 8 comments
Labels
api completeness This is basic API functionality that hasn't been implemented yet. api-repositories Work to complete the API's defined here: https://developer.github.com/v3/repos/

Comments

@raghav710
Copy link

raghav710 commented Mar 22, 2020

@raghav710
Copy link
Author

@HowardWolosky realized that this is needed for my other PRs (merging branches, updating refs). Would we be okay to get them merged and I can add test cases when I add this feature. Or would we want to push this in first?

@HowardWolosky
Copy link
Member

@Shazwazza just added the Get contents method. They were interested in adding the create/update method next. @raghav710, were you looking to do this yourself, or were you just trying to track the need for it?

@raghav710
Copy link
Author

raghav710 commented Apr 18, 2020

@HowardWolosky that's great to know. I'm happy if @Shazwazza can take up create/update as well.

I just needed Content related APIs for writing the tests for my PRs and not especially wanting to do it by myself 👍

Hope you are fine. Stay safe 👍

@damienvanrobaeys
Copy link

Regarding the uploading part, I'm able to upload file (zip, rar, exe, pS1, txt, pdf ...) on github using the below code:

$File_To_Upload = Read-Host "Type the path of the file to upload"
$Get_File_Name = (Get-ChildItem $File_To_Upload).name
$Encoded_File = [System.Convert]::ToBase64String([System.IO.File]::ReadAllBytes("$File_To_Uplo

{
"message": "",
"content": "$Encoded_File"
}
"@

Invoke-GHRestMethod -UriFragment "https://api.github.com/repos/$owner/$repositoryname/contents/$Get_File_Name" -Method PUT -Body $MyFile_JSON

@HowardWolosky HowardWolosky added api completeness This is basic API functionality that hasn't been implemented yet. api-repositories Work to complete the API's defined here: https://developer.github.com/v3/repos/ labels May 12, 2020
@HowardWolosky
Copy link
Member

HowardWolosky commented May 28, 2020

Bumping this up to see if anyone is actively working on this. Two of the existing tests in GitHubContents.tests.ps1 are currently brittle because they start to fail anytime GitHub changes the default HTML presentation of their README.md file:
Context 'For getting html (byte) file contents' and Context 'For getting html (string) file contents'

@raghav710
Copy link
Author

raghav710 commented May 30, 2020

@HowardWolosky I'm not working on this currently. But I can take this up after my existing PRs are done, if no one takes it up by then

@Shazwazza
Copy link
Contributor

Hi all, I don't have a whole lot of time at the moment so would be great if you could pick it up if you've got the time. I'll check back in a couple weeks when I hopefully have some extra time and see what the status is.

@X-Guardian
Copy link
Contributor

Create or update a file has been completed in PR #241.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api completeness This is basic API functionality that hasn't been implemented yet. api-repositories Work to complete the API's defined here: https://developer.github.com/v3/repos/
Projects
None yet
Development

No branches or pull requests

5 participants