chore: ignore fork PRs in devin-conflict-resolver workflow (#26640)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
4819be0093
commit
2a26a591a8
@@ -86,12 +86,18 @@ jobs:
|
||||
|
||||
function processPR(pr, mergeableStatus) {
|
||||
const isTargetPR = manualPrNumber && pr.number === manualPrNumber;
|
||||
const isFork = pr.headRepository?.owner?.login !== owner;
|
||||
|
||||
if (!isTargetPR && pr.isDraft) {
|
||||
console.log(`PR #${pr.number} is a draft, skipping`);
|
||||
return { skip: true };
|
||||
}
|
||||
|
||||
if (!isTargetPR && isFork) {
|
||||
console.log(`PR #${pr.number} is from a fork, skipping`);
|
||||
return { skip: true };
|
||||
}
|
||||
|
||||
if (!isTargetPR) {
|
||||
const hasDevinLabel = pr.labels.nodes.some(label => label.name === 'devin-conflict-resolution');
|
||||
if (hasDevinLabel) {
|
||||
@@ -101,19 +107,13 @@ jobs:
|
||||
}
|
||||
|
||||
if (mergeableStatus === 'CONFLICTING' || (isTargetPR && mergeableStatus !== 'MERGEABLE')) {
|
||||
const isFork = pr.headRepository?.owner?.login !== owner;
|
||||
const headRepoOwner = pr.headRepository?.owner?.login || owner;
|
||||
const headRepoName = pr.headRepository?.name || repo;
|
||||
|
||||
if (!isTargetPR && isFork && !pr.maintainerCanModify) {
|
||||
console.log(`PR #${pr.number} is from a fork without maintainer push access, skipping`);
|
||||
return { skip: true };
|
||||
}
|
||||
|
||||
if (isTargetPR) {
|
||||
console.log(`PR #${pr.number} manually targeted for conflict resolution${isFork ? ' (from fork)' : ''}`);
|
||||
} else {
|
||||
console.log(`PR #${pr.number} has conflicts${isFork ? ' (from fork)' : ''}`);
|
||||
console.log(`PR #${pr.number} has conflicts`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user