@@ -37661,7 +37661,7 @@ var core = __nccwpck_require__(2186);
37661
37661
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
37662
37662
var github = __nccwpck_require__(5438);
37663
37663
;// CONCATENATED MODULE: ./package.json
37664
- const package_namespaceObject = JSON.parse('{"u2":"@krauters/github-notifier","i8":"0.10 .0","Xh":"https://github.com/krauters/github-notifier"}');
37664
+ const package_namespaceObject = JSON.parse('{"u2":"@krauters/github-notifier","i8":"0.11 .0","Xh":"https://github.com/krauters/github-notifier"}');
37665
37665
;// CONCATENATED MODULE: ./src/defaults.ts
37666
37666
const scmUrl = 'https://github.com';
37667
37667
const prBaseUrl = `${scmUrl}/pulls?q=is%3Aopen+is%3Apr+archived%3Afalse+draft%3Afalse+user%3A`;
@@ -37744,6 +37744,7 @@ function* generateBatches(items, size = 50) {
37744
37744
yield items.slice(i, i + size);
37745
37745
}
37746
37746
}
37747
+ // Todo - Move this to shared utils.
37747
37748
const snapActions = {
37748
37749
[SnapType.Day]: (date) => {
37749
37750
date.setHours(0, 0, 0, 0);
@@ -41463,6 +41464,7 @@ var PullState;
41463
41464
})(PullState || (PullState = {}));
41464
41465
41465
41466
;// CONCATENATED MODULE: ./src/utils/github/github-client.ts
41467
+ /* eslint-disable @typescript-eslint/naming-convention */
41466
41468
41467
41469
41468
41470
@@ -41574,10 +41576,12 @@ class GitHubClient {
41574
41576
};
41575
41577
}
41576
41578
const minutesUntilMerged = minutesBetweenDates(pull.createdAt, pull.mergedAt);
41579
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
41577
41580
minutesUntilMerged && report[key].minutesUntilMerged.push(minutesUntilMerged / 60);
41578
41581
const minutesUntilFirstReview = firstReview
41579
41582
? minutesBetweenDates(pull.createdAt, new Date(String(firstReview.submitted_at)))
41580
41583
: undefined;
41584
+ // eslint-disable-next-line @typescript-eslint/no-unused-expressions
41581
41585
minutesUntilFirstReview && report[key].minutesUntilFirstReview.push(minutesUntilFirstReview / 60);
41582
41586
}
41583
41587
let reportString = 'GitHub Notifier Pull Report (Averages)\n';
@@ -41921,6 +41925,7 @@ function getContextMarkdownBlock(text, withIndentation = false) {
41921
41925
* @param {boolean} withUserMentions - Whether or not to mention Slack users.
41922
41926
* @returns {Promise<KnownBlock[]>}
41923
41927
*/
41928
+ // eslint-disable-next-line max-lines-per-function
41924
41929
async function getPullBlocks(pull, slack, withUserMentions) {
41925
41930
const { age, ageInHours, commits, draft, filesAndChanges, number, repo, repoUrl, requestedReviewers, reviewReport, title, url, } = pull;
41926
41931
let ageBasedEmoji = getAgeBasedEmoji(ageInHours);
@@ -41975,6 +41980,7 @@ async function getPullBlocks(pull, slack, withUserMentions) {
41975
41980
const slackUserIdsOrLogins = [];
41976
41981
for (const username of requestedReviewers) {
41977
41982
const slackUser = await slack.getSlackUser({ username });
41983
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
41978
41984
slackUserIdsOrLogins.push((withUserMentions && slackUser?.id && `<@${slackUser.id}>`) || username);
41979
41985
}
41980
41986
contextBlocks.unshift(...getContextMarkdownBlock(formatStringList(slackUserIdsOrLogins) +
@@ -42147,7 +42153,10 @@ class SlackClient {
42147
42153
return user?.id === userId;
42148
42154
}
42149
42155
const profile = user.profile;
42150
- return ((email && profile?.email === email) ||
42156
+ return (
42157
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
42158
+ (email && profile?.email === email) ||
42159
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
42151
42160
String(profile?.email).includes(username) ||
42152
42161
profile?.display_name === username ||
42153
42162
profile?.real_name === username);
@@ -42189,9 +42198,7 @@ class SlackClient {
42189
42198
;// CONCATENATED MODULE: ./src/utils/test-data.ts
42190
42199
42191
42200
42192
- /**
42193
- * Get approved pull request as test data.
42194
- */
42201
+ // eslint-disable-next-line jsdoc/require-jsdoc
42195
42202
function getApprovedPullRequest() {
42196
42203
console.log(`Getting test data for user [${github.context.actor}]`);
42197
42204
return {
@@ -42317,7 +42324,7 @@ async function main() {
42317
42324
const withArchived = (0,core.getBooleanInput)('with-archived');
42318
42325
const withPublic = (0,core.getBooleanInput)('with-public');
42319
42326
const withDrafts = (0,core.getBooleanInput)('with-drafts');
42320
- const withPullReport = false; // Not an active feature yet
42327
+ const withPullReport = false;
42321
42328
const withUserMentions = (0,core.getBooleanInput)('with-user-mentions');
42322
42329
const repositoryFilter = stringToArray((0,core.getInput)('repository-filter'));
42323
42330
// https://github.com/actions/github-script/issues/436
0 commit comments