mirror of
https://github.com/empayre/fleet.git
synced 2024-11-06 08:55:24 +00:00
Exclude handbook and ceo labels from contributor PR count (#12226)
This commit is contained in:
parent
2ce7291e1b
commit
e4c38dfb7c
8
website/scripts/get-bug-and-pr-report.js
vendored
8
website/scripts/get-bug-and-pr-report.js
vendored
@ -181,7 +181,9 @@ module.exports = {
|
||||
if (!pullRequest.draft) {// Exclude draft PRs
|
||||
daysSincePullRequestsWereOpened.push(timeOpenInDays);
|
||||
}
|
||||
if (!pullRequest.draft && pullRequest.user.type !== 'Bot') {// Exclude draft PRs and PRs from bots
|
||||
// If not a draft, not a bot, not a PR labeled with #handbook
|
||||
// Track as a contributor PR and include in contributor PR KPI
|
||||
if (!pullRequest.draft && pullRequest.user.type !== 'Bot' && !pullRequest.labels.some(label => label.name === '#handbook' || label.name === '#g-ceo')) {
|
||||
daysSinceContributorPullRequestsWereOpened.push(timeOpenInDays);
|
||||
contributorPullRequests.push(pullRequest);
|
||||
}
|
||||
@ -216,8 +218,8 @@ module.exports = {
|
||||
Number of open pull requests in the fleetdm/fleet Github repo: ${daysSincePullRequestsWereOpened.length}
|
||||
Average open time: ${averageDaysPullRequestsAreOpenFor} days.
|
||||
|
||||
Number of open pull requests in the fleetdm/fleet Github repo (no bots): ${daysSinceContributorPullRequestsWereOpened.length}
|
||||
Average open time (no bots): ${averageDaysContributorPullRequestsAreOpenFor} days.`);
|
||||
Number of open pull requests in the fleetdm/fleet Github repo (no bots, no handbook, no ceo): ${daysSinceContributorPullRequestsWereOpened.length}
|
||||
Average open time (no bots, no handbook, no ceo): ${averageDaysContributorPullRequestsAreOpenFor} days.`);
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user