Comments (7)
https://api.github.com/repos/singapore/package-test/contents/package.json seems to return the package.json
in base64 format, but when I copy/paste the "content" field into online decoders, it seems to have a character problem.
The response also includes a "download_url" field which works (gives the raw file).
from renovate.
Adding Accept: application/vnd.github.VERSION.raw
header gets you the raw file!
from renovate.
A URL like https://api.github.com/repos/singapore/package-test/contents/package.json?ref=upgrade/angular will get the package.json from branch "upgrade/angular". If the branch/file doesn't exist then you get a response like:
{
"message": "No commit found for the ref upgrade/angular2",
"documentation_url": "https://developer.github.com/v3/repos/contents/"
}
from renovate.
The master SHA can be found with this URL: https://api.github.com/repos/singapore/package-test/commits/master
from renovate.
Create a branch. Use https://api.github.com/repos/singapore/package-test/git/refs. Response is:
{
"ref": "refs/heads/testtest1",
"url": "https://api.github.com/repos/singapore/package-test/git/refs/heads/testtest1",
"object": {
"sha": "61fe1c4451cf22df5c84f9b0b6876f7214c476ce",
"type": "commit",
"url": "https://api.github.com/repos/singapore/package-test/git/commits/61fe1c4451cf22df5c84f9b0b6876f7214c476ce"
}
}
from renovate.
Get the SHA of package.json for branch testtest1
: https://api.github.com/repos/singapore/package-test/contents/package.json?ref=testtest1
9e7c115f680cfdeb0822fec8be35aa8cb2e9f920
from renovate.
Updating package.json in a branch also worked.
URL: https://api.github.com/repos/singapore/package-test/contents/package.json
Body:
{
"branch": "testtest1",
"message": "update from API",
"author": {
"name": "Renovate Bot",
"email": "[email protected]"
},
"content": "ew0KICAibmFtZSI6ICJjbGllbnQtYnVpbGQiLA0KICAiZGVzY3JpcHRpb24iOiAiQ2xpZW50IG5vZGUgbW9kdWxlcyBmb3Iga2V5bG9jYXRpb24iLA0KICAidmVyc2lvbiI6ICIxLjAuMCIsDQogICJhdXRob3IiOiAiUmh5cyBBcmtpbnMgPHJoeXNAa2V5bG9jYXRpb24uc2c+IiwNCiAgImJ1Z3MiOiAiaHR0cHM6Ly9naXRodWIuY29tL3NpbmdhcG9yZS9rZXlsb2NhdGlvbi9pc3N1ZXMiLA0KICAiY29udHJpYn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IjEuOC4xIiwNCiAgICAidWktc2VsZWN0IjogIjAuMTkuNiINCiAgfSwNCiAgImhvbWVwYWdlIjogImh0dHBzOi8va2V5bG9jYXRpb24uc2ciLA0KICAia2V5d29yZHMiOiBbDQogICAgIktleSBMb2NhdGlvbiIsDQogICAgIlNpbmdhcG9yZSINCiAgXSwNCiAgImxpY2Vuc2UiOiAiUHJvcHJpZXRhcnkgYW5kIENvbmZpZGVudGlhbCIsDQogICJwcml2YXRlIjogdHJ1ZSwNCiAgInJlcG9zaXRvcnkiOiB7DQogICAgInR5cGUiOiAiZ2l0IiwNCiAgICAidXJsIjogImh0dHA6Ly9naXRodWIuY29tL3NpbmdhcG9yZS9rZXlsb2NhdGlvbi5naXQiDQogIH0NCn0=",
"sha": "fb617c9e42866ca24d0ff8e0c2725048f6f9530c"
}
from renovate.
Related Issues (20)
- Raise config error if users configures `matchBaseBranches` without `baseBranches` also configured. HOT 1
- Convert experimental env into globalOnly `experimentalFlags` HOT 8
- "failed to add assignee (Cannot read properties of undefined (reading 'id'))" on Gitlab self-hosted HOT 1
- [helm-values] support `registryAliases` HOT 1
- getBranchPr() reopens PR
- Default to JSON5 parsing HOT 3
- Replace JSON config migration code with jsonc-parser
- Split user vs machine debug data in PRs
- v38 planning HOT 1
- [manager/nuget] packages.lock file should be updated when dotnet-sdk is updated
- Record preset renovate.json fallbacks in repositoryCache
- Use github-refs for GitHub Actions
- [META] Allow to bump generic version references via new `bumpVersions` config option
- Track and log GitHub rate limit headers
- Cache more (all) GitHub repo endpoints HOT 4
- Change onboardingNoDeps to enum, and behavior similar to forkProcessing HOT 5
- Replace hardcoded github.com/gitlab.com checks with detectPlatform()
- Use `gitea-refs` for Gitea / ForgejoActions
- globalExtends should not override global config HOT 7
- Add warning admonition about installing Renovate in silent mode leads to no onboarding PRs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from renovate.