|
1 | | -import {GitHubV4Client, PartialError} from './GitHubV4Client'; |
2 | | -import {RemoteGitHubV4IssueEntity, RemoteGitHubV4IssueNodesEntity, RemoteGitHubV4Review, RemoteGitHubV4TimelineItemEntity} from '../../Type/RemoteGitHubV4/RemoteGitHubV4IssueNodesEntity'; |
| 1 | +import dayjs from 'dayjs'; |
| 2 | +import {Logger} from '../../Infra/Logger'; |
3 | 3 | import {RemoteIssueEntity, RemoteProjectEntity, RemoteProjectFieldEntity, RemoteReviewEntity, RemoteUserEntity} from '../../Type/RemoteGitHubV3/RemoteIssueEntity'; |
| 4 | +import {RemoteGitHubV4IssueEntity, RemoteGitHubV4IssueNodesEntity, RemoteGitHubV4Review, RemoteGitHubV4TimelineItemEntity} from '../../Type/RemoteGitHubV4/RemoteGitHubV4IssueNodesEntity'; |
4 | 5 | import {ArrayUtil} from '../../Util/ArrayUtil'; |
5 | 6 | import {TimerUtil} from '../../Util/TimerUtil'; |
6 | | -import dayjs from 'dayjs'; |
7 | | -import {Logger} from '../../Infra/Logger'; |
| 7 | +import {GitHubV4Client, PartialError} from './GitHubV4Client'; |
8 | 8 |
|
9 | 9 | type PartialIssue = { |
10 | 10 | node_id: string; |
@@ -271,6 +271,13 @@ export class GitHubV4IssueClient extends GitHubV4Client { |
271 | 271 | // たとえばissueが別のリポジトリに移動していた場合はnodeIdが変わるようだ。 |
272 | 272 | const issues = data.nodes.filter(node => node); |
273 | 273 |
|
| 274 | + // 現時点(2022-08-17)では、OAuthアプリでorgのissueのgithubプロジェクト情報を取得できず、値にnullが入ってくる。 |
| 275 | + // そのためここでフィルターしておく。 |
| 276 | + // 再現方法: jasperをoauthアプリ承認していないorgで、パブリックなgithubプロジェクトに紐付いたパブリックリポジトリのissueからgithubプロジェクト情報を読み取ると再現する。 |
| 277 | + issues.forEach(issue => { |
| 278 | + issue.projectNextItems.nodes = issue.projectNextItems.nodes.filter(item => item != null); |
| 279 | + }); |
| 280 | + |
274 | 281 | const foundNodeIds = issues.map(issue => issue.node_id); |
275 | 282 | const notFoundIssues = requestIssues.filter(issue => !foundNodeIds.includes(issue.node_id)); |
276 | 283 |
|
|
0 commit comments