${emptyTitl
| ${reviewBadge} |
${renderReviewerAvatars(pr.reviewers_json)} |
- ${escapeHtml(mergeableText)} |
+
+
+ ${escapeHtml(mergeableText)}
+ ${mergeableText === 'Conflicts' ? `` : ''}
+
+ |
${pr.files_changed} |
${pr.commits_count || 0} |
@@ -2589,6 +2609,26 @@ ${emptyTitl
|
`;
+ // Add click handler for the conflict message button
+ const conflictMessageBtn = row.querySelector('.conflict-message-btn');
+ if (conflictMessageBtn) {
+ conflictMessageBtn.addEventListener('click', async (e) => {
+ e.stopPropagation();
+ const prUrl = conflictMessageBtn.dataset.prUrl;
+ const authorLogin = conflictMessageBtn.dataset.authorLogin;
+ const authorMention = authorLogin && /^[a-zA-Z0-9_.-]+$/.test(authorLogin) ? `@${authorLogin}` : 'contributor';
+ const message = `Hi ${authorMention}, this PR has merge conflicts that need to be resolved before it can be merged. Could you please fix the conflicts? Thank you!`;
+ const prUrlWithComment = `${prUrl}?expand=1&body=${encodeURIComponent(message)}`;
+ try {
+ await navigator.clipboard.writeText(message);
+ showSuccessToast('Opening PR with conflict message pre-filled...');
+ } catch (err) {
+ console.error('Failed to copy conflict message:', err);
+ }
+ window.open(prUrlWithComment, '_blank', 'noopener,noreferrer');
+ });
+ }
+
// Add click handler to highlight the row when clicked
row.addEventListener('click', (e) => {
// Don't trigger row selection if clicking on the update button or links