Property `content` does not exist on type `ReposGetContentsResponse`
See original GitHub issueBug Report
Full source: https://github.com/Logerfo/close-label
Current Behavior
Heroku build failed after upgrading from v9.4.0 to v9.5.0:
error TS2339: Property
content
does not exist on typeReposGetContentsResponse
. Propertycontent
does not exist on typeReposGetContentsResponseItem[]
.
let content
try {
content = await context.github.repos.getContents(context.repo({
path: '.github/close-label.yml',
}))
}
catch {
app.log('.github/close-label.yml not found. Stepping out...')
return
}
const config = yaml.safeLoad(Buffer.from(content.data.content, 'base64').toString()) //error here
Environment
- Probot version(s): v9.5.0
- Node/npm version: 12.10.0/6.10.3
- OS: IDK (Heroku)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Typescript type assertion for type that can be an array or plain
You can use !Array.isArray(fileInfo.data) && typeof fileInfo.data === 'object' to check if a variable is array or not and it is an object....
Read more >배열 또는 일반일 수 있는 유형에 대한 Typescript 유형 주장 ...
type ReposGetContentsResponse = | { _links: ReposGetContentsResponseLinks; ... Returns contents of a file, if ref is not specified, it will use the default ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The change in https://github.com/Logerfo/close-label/commit/d1c20b83ed9eeed80eefcc9cc6178601e3565d09 looks good 👍
Note that https://github.com/probot/probot-config is now included in probot itself, so you don’t need to implement reading the config file yourself
Issue-Label Bot is automatically applying the label
bug 🐞
to this issue, with a confidence of 0.97. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.