Show merge-conflict badge on PR cards via GraphQL mergeable field
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DgBEW6qAwgn2fcQbA2f4ZQ
This commit is contained in:
co-authored by
Claude Fable 5
parent
5aa6f3367d
commit
ab6e3bbe3a
@@ -11,6 +11,7 @@ export const LIST_QUERY = /* GraphQL */ `
|
||||
title
|
||||
url
|
||||
isDraft
|
||||
mergeable
|
||||
updatedAt
|
||||
author { login }
|
||||
headRefName
|
||||
@@ -34,6 +35,7 @@ export interface ListPr {
|
||||
title: string;
|
||||
url: string;
|
||||
isDraft: boolean;
|
||||
mergeable: 'MERGEABLE' | 'CONFLICTING' | 'UNKNOWN';
|
||||
updatedAt: string;
|
||||
author: { login: string } | null;
|
||||
headRefName: string;
|
||||
|
||||
@@ -37,6 +37,7 @@ function signature(pr: ListPr): string {
|
||||
pr.reviews.totalCount,
|
||||
pr.latestReviews.nodes.map((r) => `${r.author?.login}:${r.state}`),
|
||||
pr.labels.nodes.map((l) => l.name).sort(),
|
||||
pr.mergeable,
|
||||
]),
|
||||
)
|
||||
.digest('hex');
|
||||
@@ -82,6 +83,7 @@ function buildSnapshot(config: AppConfig, pr: ListPr, detail: DetailPr | undefin
|
||||
url: pr.url,
|
||||
author: pr.author?.login ?? 'ghost',
|
||||
isDraft: pr.isDraft,
|
||||
mergeable: pr.mergeable,
|
||||
branch: pr.headRefName,
|
||||
updatedAt: pr.updatedAt,
|
||||
labels,
|
||||
|
||||
Reference in New Issue
Block a user