Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/pr-welcome-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,18 @@ jobs:

// --- Group by product, merging owners across files ---
const productOwners = new Map();
let authorIsOwner = false;
for (const file of files) {
const owners = findOwners(file.filename);
const ownerNames = owners.map(o => o.replace(/^@/, ''));

if (ownerNames.some(o => o.toLowerCase() === author.toLowerCase())) {
authorIsOwner = true;
}

const product = getProductName(file.filename);
if (!product || owners.length === 0) continue;

const ownerNames = owners.map(o => o.replace(/^@/, ''));

// Skip areas where the author is already an owner
if (ownerNames.some(o => o.toLowerCase() === author.toLowerCase())) continue;

Expand All @@ -123,7 +128,8 @@ jobs:
}

if (productOwners.size === 0) {
if (author.toLowerCase() === 'lnhsingh') return;
// Skip fallback if author owns any of the changed files
if (authorIsOwner || author.toLowerCase() === 'lnhsingh') return;
productOwners.set('General changes', new Set(['lnhsingh']));
}

Expand Down
Loading