Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 5 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33210,13 +33210,16 @@ async function run() {
// Display all code owners
info(`Owners With Modified Files: ${ownersWithModifiedFiles.join(' ')}`);
//# Part 2: Requesting reviews based on owners listed above
//Remove the @ symbol at the start of every owner name
const trimmed_owners = [];
//Remove the @ symbol at the start of every owner name
for (const owner of ownersWithModifiedFiles) {
trimmed_owners.push(owner.replace('@', ''));
}
//Remove PR author from the user list
trimmed_owners.splice(trimmed_owners.indexOf(response.data.user.login), 1);
const index = trimmed_owners.indexOf(response.data.user.login);
if (index >= 0) {
trimmed_owners.splice(index, 1);
}
//No reviewers so stop here
if (!trimmed_owners.length) {
info('No reviewers to call');
Expand Down
10 changes: 5 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,18 +148,18 @@ async function run(): Promise<void> {
info(`Owners With Modified Files: ${ownersWithModifiedFiles.join(' ')}`)

//# Part 2: Requesting reviews based on owners listed above
const trimmed_owners: string[] = []

//Remove the @ symbol at the start of every owner name
const trimmed_owners: string[] = []
for (const owner of ownersWithModifiedFiles) {
trimmed_owners.push(owner.replace('@', ''))
}

//Remove PR author from the user list
trimmed_owners.splice(
trimmed_owners.indexOf(response.data.user.login),
1
)
const index = trimmed_owners.indexOf(response.data.user.login)
if (index >= 0) {
trimmed_owners.splice(index, 1)
}

//No reviewers so stop here
if (!trimmed_owners.length) {
Expand Down