Feature: provider-agnostic API to fetch file contents of a different ref
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 381
- Avg merge
- 2h 8m
- Merged PRs (30d)
- 6
Description
**Describe the bug**
`danger.github` is undefined.
```shell
Cannot read property 'pr' of undefined
TypeError: Cannot read property 'pr' of undefined
at dangerfile.js:5:62
```
**To Reproduce**
- `git clone https://github.com/edno/danger-github-undefined.git`
- `cd danger-github-undefined`
- `yarn install` (Yarn 2)
- `git checkout new-branch`
- `yarn danger local -b main`
**Expected behavior**
This should display
```js
message(`:tada: The PR added ${additions} and removed ${deletions} lines.`)
```
**Environment**
| software | version
| ---------------- | -------
| danger.js | ^10.6.2
| node | v12.18.3
| yarn | 2.4.0
| Operating System | MacOS 11.2.1
Contributor guide
Research direction
Reproduce the failure from dangerfile.js using the listed danger local -b main command and the danger-github-undefined example repository. Investigate why danger.github is unavailable in that run, then verify that danger.github.pr can be accessed and the expected additions/deletions message is displayed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100