You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (state === _structures_js__WEBPACK_IMPORTED_MODULE_0__/* .PullState */ .lT.Open) {
81098
-
console.log(`Getting [${state}] pulls in org [${org}]...`);
81101
+
(0,_actions_core__WEBPACK_IMPORTED_MODULE_1__.debug)(`Getting [${state}] ${(0,_krauters_utils__WEBPACK_IMPORTED_MODULE_2__.plural)('pull', 2)} in org [${org}]...`);
81099
81102
}
81100
81103
else {
81101
-
console.log(`Getting [${state}] pulls in org [${org}] that are newer than [${oldest}...`);
81104
+
(0,_actions_core__WEBPACK_IMPORTED_MODULE_1__.debug)(`Getting [${state}] ${(0,_krauters_utils__WEBPACK_IMPORTED_MODULE_2__.plural)('pull', 2)} in org [${org}] that are newer than [${oldest}]...`);
81102
81105
}
81103
81106
const pullRequests = [];
81107
+
let apiRequestCount = 0;
81104
81108
for (const repo of repositories) {
81105
81109
(0,_actions_core__WEBPACK_IMPORTED_MODULE_1__.debug)(`Getting [${state}] pulls in repository [${repo.name}]...`);
(0,_actions_core__WEBPACK_IMPORTED_MODULE_1__.debug)(`Paginated response for repository [${repo.name}], status [${response.status}], items [${response.data.length}]`);
81112
81118
const found = response.data.find((pull) => new Date(pull.created_at) < oldest);
81113
81119
if (found && state !== _structures_js__WEBPACK_IMPORTED_MODULE_0__/* .PullState */ .lT.Open) {
@@ -81116,7 +81122,8 @@ class GitHubClient {
81116
81122
}
81117
81123
return response.data.filter((pull) => new Date(pull.created_at) > oldest);
81118
81124
});
81119
-
console.log(`Found [${pulls.length}] pull in repository [${repo.name}]`);
(0,_actions_core__WEBPACK_IMPORTED_MODULE_1__.debug)(`Found [${pulls.length}] pull in repository [${repo.name}] in [${repoDuration.toFixed(2)}] seconds`);
console.log(`Completed processing [${pullRequests.length}] pull requests in [${totalDuration.toFixed(2)}] seconds with [${apiRequestCount}] API calls`);
console.log(`Slack client initialized with [${channels.length}] ${(0,src.plural)('channel', channels.length)} and [${userMappings.length}] user ${(0,src.plural)('mapping', userMappings.length)}`);
81835
81846
}
81836
81847
/**
81837
81848
* Ensure app name pattern.
@@ -81848,6 +81859,7 @@ class SlackClient {
81848
81859
throw new Error(`Current app name [${name}] does not match the desired pattern [${pattern}]. Please update Slack app "Basic Information" > "Display Information" > "App name" to have the suffix "GitHub Notifier". Slack app url [${SlackAppUrl.Prefix}/${info?.bot?.app_id}/${SlackAppUrl.SuffixDisplayInfo}].`);
// Keep paginating until no more cursor is returned
81861
81874
do {
@@ -81866,7 +81879,8 @@ class SlackClient {
81866
81879
cursor = result.response_metadata?.next_cursor;
81867
81880
(0,core.debug)(`Got [${result.members?.length}] users from Slack`);
81868
81881
} while (cursor);
81869
-
console.log(`Got a total of [${this.users.length}] active users from Slack`);
81882
+
const duration = (Date.now() - startTime) / 1000;
81883
+
console.log(`Got a total of [${this.users.length}] active ${(0,src.plural)('user', this.users.length)} from Slack in [${duration.toFixed(2)}] seconds`);
0 commit comments