github-tools / github-tools/github
Creating search from string doesn't work
- 主要言語
- JavaScript
- スター
- 3.8k
- フォーク
- 809
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Trying to use the function http://github-tools.github.io/github/docs/3.2.3/GitHub.html#search (using 3.4.0 but the docs aren't up for that) like this:
```js
console.log(gh.search('query'))
```
gives this error:
```
/home/heath/SyncedProjects/CredentialReminderBot/node_modules/github-api/dist/components/Requestable.js:162
requestOptions.type = requestOptions.type || 'all';
^
TypeError: Cannot create property 'type' on string 'query'
at Search._getOptionsWithDefaults (/home/heath/SyncedProjects/CredentialReminderBot/node_modules/github-api/dist/components/Requestable.js:162:33)
at new Search (/home/heath/SyncedProjects/CredentialReminderBot/node_modules/github-api/dist/components/Search.js:46:30)
at GitHub.search (/home/heath/SyncedProjects/CredentialReminderBot/node_modules/github-api/dist/components/GitHub.js:159:14)
at Object. (/home/heath/SyncedProjects/CredentialReminderBot/index.js:11:16)
at Module._compile (internal/modules/cjs/loader.js:1201:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1221:10)
at Module.load (internal/modules/cjs/loader.js:1050:32)
at Function.Module._load (internal/modules/cjs/loader.js:938:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Reproduce the string call and trace the stack through dist/components/GitHub.js, Search.js, and Requestable.js, starting at _getOptionsWithDefaults. Compare the documented search invocation with the current argument handling, then verify the corrected behavior with the relevant existing search checks or a focused regression test.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- api
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 45/100