parent
2e221262b1
commit
002bc97450
|
@ -168,6 +168,14 @@ inputs:
|
||||||
description: 'Display some statistics at the end regarding the stale workflow (only when the logs are enabled).'
|
description: 'Display some statistics at the end regarding the stale workflow (only when the logs are enabled).'
|
||||||
default: 'true'
|
default: 'true'
|
||||||
required: false
|
required: false
|
||||||
|
labels-to-add-when-unstale:
|
||||||
|
description: 'A comma delimited list of labels to add when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it.'
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
|
labels-to-remove-when-unstale:
|
||||||
|
description: 'A comma delimited list of labels to remove when a stale issue or pull request receives activity and has the stale-issue-label or stale-pr-label removed from it.'
|
||||||
|
default: ''
|
||||||
|
required: false
|
||||||
outputs:
|
outputs:
|
||||||
closed-issues-prs:
|
closed-issues-prs:
|
||||||
description: 'List of all closed issues and pull requests.'
|
description: 'List of all closed issues and pull requests.'
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
module.exports =
|
|
||||||
/******/ (() => { // webpackBootstrap
|
/******/ (() => { // webpackBootstrap
|
||||||
/******/ var __webpack_modules__ = ({
|
/******/ var __webpack_modules__ = ({
|
||||||
|
|
||||||
|
@ -541,7 +540,8 @@ class IssuesProcessor {
|
||||||
});
|
});
|
||||||
const events = yield this.client.paginate(options);
|
const events = yield this.client.paginate(options);
|
||||||
const reversedEvents = events.reverse();
|
const reversedEvents = events.reverse();
|
||||||
const staleLabeledEvent = reversedEvents.find(event => event.event === 'labeled' && clean_label_1.cleanLabel(event.label.name) === clean_label_1.cleanLabel(label));
|
const staleLabeledEvent = reversedEvents.find(event => event.event === 'labeled' &&
|
||||||
|
clean_label_1.cleanLabel(event.label.name) === clean_label_1.cleanLabel(label));
|
||||||
if (!staleLabeledEvent) {
|
if (!staleLabeledEvent) {
|
||||||
// Must be old rather than labeled
|
// Must be old rather than labeled
|
||||||
return undefined;
|
return undefined;
|
||||||
|
@ -8953,8 +8953,9 @@ module.exports = require("zlib");;
|
||||||
/******/ // The require function
|
/******/ // The require function
|
||||||
/******/ function __nccwpck_require__(moduleId) {
|
/******/ function __nccwpck_require__(moduleId) {
|
||||||
/******/ // Check if module is in cache
|
/******/ // Check if module is in cache
|
||||||
/******/ if(__webpack_module_cache__[moduleId]) {
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||||||
/******/ return __webpack_module_cache__[moduleId].exports;
|
/******/ if (cachedModule !== undefined) {
|
||||||
|
/******/ return cachedModule.exports;
|
||||||
/******/ }
|
/******/ }
|
||||||
/******/ // Create a new module (and put it into the cache)
|
/******/ // Create a new module (and put it into the cache)
|
||||||
/******/ var module = __webpack_module_cache__[moduleId] = {
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||||||
|
@ -8991,10 +8992,13 @@ module.exports = require("zlib");;
|
||||||
/******/
|
/******/
|
||||||
/******/ /* webpack/runtime/compat */
|
/******/ /* webpack/runtime/compat */
|
||||||
/******/
|
/******/
|
||||||
/******/ __nccwpck_require__.ab = __dirname + "/";/************************************************************************/
|
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/
|
||||||
/******/ // module exports must be returned from runtime so entry inlining is disabled
|
/******/
|
||||||
/******/ // startup
|
/******/ // startup
|
||||||
/******/ // Load entry module and return exports
|
/******/ // Load entry module and return exports
|
||||||
/******/ return __nccwpck_require__(3109);
|
/******/ // This entry module is referenced by other modules so it can't be inlined
|
||||||
|
/******/ var __webpack_exports__ = __nccwpck_require__(3109);
|
||||||
|
/******/ module.exports = __webpack_exports__;
|
||||||
|
/******/
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
|
@ -8,7 +8,7 @@ import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than'
|
||||||
import {isValidDate} from '../functions/dates/is-valid-date';
|
import {isValidDate} from '../functions/dates/is-valid-date';
|
||||||
import {isBoolean} from '../functions/is-boolean';
|
import {isBoolean} from '../functions/is-boolean';
|
||||||
import {isLabeled} from '../functions/is-labeled';
|
import {isLabeled} from '../functions/is-labeled';
|
||||||
import { cleanLabel } from '../functions/clean-label';
|
import {cleanLabel} from '../functions/clean-label';
|
||||||
import {shouldMarkWhenStale} from '../functions/should-mark-when-stale';
|
import {shouldMarkWhenStale} from '../functions/should-mark-when-stale';
|
||||||
import {wordsToList} from '../functions/words-to-list';
|
import {wordsToList} from '../functions/words-to-list';
|
||||||
import {IComment} from '../interfaces/comment';
|
import {IComment} from '../interfaces/comment';
|
||||||
|
@ -537,7 +537,9 @@ export class IssuesProcessor {
|
||||||
const reversedEvents = events.reverse();
|
const reversedEvents = events.reverse();
|
||||||
|
|
||||||
const staleLabeledEvent = reversedEvents.find(
|
const staleLabeledEvent = reversedEvents.find(
|
||||||
event => event.event === 'labeled' && cleanLabel(event.label.name) === cleanLabel(label)
|
event =>
|
||||||
|
event.event === 'labeled' &&
|
||||||
|
cleanLabel(event.label.name) === cleanLabel(label)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!staleLabeledEvent) {
|
if (!staleLabeledEvent) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import deburr from 'lodash.deburr';
|
import deburr from 'lodash.deburr';
|
||||||
import { CleanLabel } from '../types/clean-label';
|
import {CleanLabel} from '../types/clean-label';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description
|
* @description
|
||||||
|
@ -10,5 +10,5 @@ import { CleanLabel } from '../types/clean-label';
|
||||||
* @return {string} A lowercased, deburred version of the passed in label
|
* @return {string} A lowercased, deburred version of the passed in label
|
||||||
*/
|
*/
|
||||||
export function cleanLabel(label: Readonly<string>): CleanLabel {
|
export function cleanLabel(label: Readonly<string>): CleanLabel {
|
||||||
return deburr(label.toLowerCase());
|
return deburr(label.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue