mirror of
https://github.com/actions/stale.git
synced 2025-12-23 17:08:18 +00:00
Compare commits
15 Commits
revert-bre
...
v5.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cc1237663 | ||
|
|
76e9fbc6ae | ||
|
|
6467b96231 | ||
|
|
8af60513da | ||
|
|
7a7efcae1f | ||
|
|
04a1828bc1 | ||
|
|
65ca3956bd | ||
|
|
eee276c280 | ||
|
|
6c2f9f3f54 | ||
|
|
37323f14dd | ||
|
|
3be940e59b | ||
|
|
7d0e5bedbf | ||
|
|
77bfb89501 | ||
|
|
7fb802b307 | ||
|
|
54197c7137 |
8
.github/workflows/check-dist.yml
vendored
8
.github/workflows/check-dist.yml
vendored
@@ -23,16 +23,18 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js 12.x
|
||||
- name: Set Node.js 16.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
node-version: 16.x
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Rebuild the dist/ directory
|
||||
run: npm run build
|
||||
run: |
|
||||
npm run build
|
||||
npm run pack
|
||||
|
||||
- name: Compare the expected and actual dist/ directories
|
||||
run: |
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
Starting in version 4.0.0 we will maintain a changelog
|
||||
## [4.1.0](https://github.com/actions/stale/compare/v3.0.19...v4.1.0) (2021-07-14)
|
||||
|
||||
## Features
|
||||
|
||||
- [Ability to exempt draft PRs](https://github.com/actions/stale/commit/9912fa74d1c01b5d6187793d97441019cbe325d0
|
||||
)
|
||||
|
||||
## [4.0.0](https://github.com/actions/stale/compare/v3.0.19...v4.0.0) (2021-07-14)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export class IssuesProcessorMock extends IssuesProcessor {
|
||||
options: IIssuesProcessorOptions,
|
||||
getIssues?: (page: number) => Promise<Issue[]>,
|
||||
listIssueComments?: (
|
||||
issueNumber: number,
|
||||
issue: Issue,
|
||||
sinceDate: string
|
||||
) => Promise<IComment[]>,
|
||||
getLabelCreationDate?: (
|
||||
|
||||
@@ -198,5 +198,5 @@ outputs:
|
||||
staled-issues-prs:
|
||||
description: 'List of all staled issues and pull requests.'
|
||||
runs:
|
||||
using: 'node12'
|
||||
using: 'node16'
|
||||
main: 'dist/index.js'
|
||||
|
||||
10
dist/index.js
vendored
10
dist/index.js
vendored
@@ -613,17 +613,17 @@ class IssuesProcessor {
|
||||
});
|
||||
}
|
||||
// Grab comments for an issue since a given date
|
||||
listIssueComments(issueNumber, sinceDate) {
|
||||
listIssueComments(issue, sinceDate) {
|
||||
var _a;
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
// Find any comments since date on the given issue
|
||||
try {
|
||||
this.operations.consumeOperation();
|
||||
this._consumeIssueOperation(issue);
|
||||
(_a = this.statistics) === null || _a === void 0 ? void 0 : _a.incrementFetchedItemsCommentsCount();
|
||||
const comments = yield this.client.issues.listComments({
|
||||
owner: github_1.context.repo.owner,
|
||||
repo: github_1.context.repo.repo,
|
||||
issue_number: issueNumber,
|
||||
issue_number: issue.number,
|
||||
since: sinceDate
|
||||
});
|
||||
return comments.data;
|
||||
@@ -763,7 +763,7 @@ class IssuesProcessor {
|
||||
return true;
|
||||
}
|
||||
// find any comments since the date
|
||||
const comments = yield this.listIssueComments(issue.number, sinceDate);
|
||||
const comments = yield this.listIssueComments(issue, sinceDate);
|
||||
const filteredComments = comments.filter(comment => comment.user.type === 'User' &&
|
||||
comment.body.toLowerCase() !== staleMessage.toLowerCase());
|
||||
issueLogger.info(`Comments that are not the stale comment or another bot: ${logger_service_1.LoggerService.cyan(filteredComments.length)}`);
|
||||
@@ -1014,7 +1014,7 @@ class IssuesProcessor {
|
||||
issueLogger.info(`Adding all the labels specified via the ${this._logger.createOptionLink(option_1.Option.LabelsToAddWhenUnstale)} option.`);
|
||||
this.addedLabelIssues.push(issue);
|
||||
try {
|
||||
this.operations.consumeOperation();
|
||||
this._consumeIssueOperation(issue);
|
||||
(_a = this.statistics) === null || _a === void 0 ? void 0 : _a.incrementAddedItemsLabel(issue);
|
||||
if (!this.options.debugOnly) {
|
||||
yield this.client.issues.addLabels({
|
||||
|
||||
1200
package-lock.json
generated
1200
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@@ -6,8 +6,8 @@
|
||||
"main": "lib/main.js",
|
||||
"scripts": {
|
||||
"build": "tsc --project tsconfig.app.json",
|
||||
"format": "prettier --write --ignore-unknown **/*.{md,json,yml,ts}",
|
||||
"format-check": "prettier --check --ignore-unknown **/*.{md,json,yml,ts}",
|
||||
"format": "prettier --write --ignore-unknown **/*.{json,yml,ts}",
|
||||
"format-check": "prettier --check --ignore-unknown **/*.{json,yml,ts}",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"lint:fix": "eslint src/**/*.ts --fix",
|
||||
"lint:all": "npm run format-check && npm run lint",
|
||||
@@ -54,15 +54,15 @@
|
||||
"ansi-styles": "5.2.0",
|
||||
"eslint": "^7.28.0",
|
||||
"eslint-plugin-github": "^4.1.2",
|
||||
"eslint-plugin-jest": "^24.4.2",
|
||||
"eslint-plugin-jest": "^25.3.2",
|
||||
"jest": "^27.2.5",
|
||||
"jest-circus": "^27.2.0",
|
||||
"jest-circus": "^27.4.6",
|
||||
"jest-silent-reporter": "^0.5.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"prettier": "^2.4.1",
|
||||
"prettier": "^2.5.1",
|
||||
"standard-version": "^9.3.1",
|
||||
"terminal-link": "^2.1.1",
|
||||
"ts-jest": "^27.0.5",
|
||||
"ts-jest": "^27.1.2",
|
||||
"typescript": "^4.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,17 +510,17 @@ export class IssuesProcessor {
|
||||
|
||||
// Grab comments for an issue since a given date
|
||||
async listIssueComments(
|
||||
issueNumber: Readonly<number>,
|
||||
issue: Readonly<Issue>,
|
||||
sinceDate: Readonly<string>
|
||||
): Promise<IComment[]> {
|
||||
// Find any comments since date on the given issue
|
||||
try {
|
||||
this.operations.consumeOperation();
|
||||
this._consumeIssueOperation(issue);
|
||||
this.statistics?.incrementFetchedItemsCommentsCount();
|
||||
const comments = await this.client.issues.listComments({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: issueNumber,
|
||||
issue_number: issue.number,
|
||||
since: sinceDate
|
||||
});
|
||||
return comments.data;
|
||||
@@ -734,7 +734,7 @@ export class IssuesProcessor {
|
||||
}
|
||||
|
||||
// find any comments since the date
|
||||
const comments = await this.listIssueComments(issue.number, sinceDate);
|
||||
const comments = await this.listIssueComments(issue, sinceDate);
|
||||
|
||||
const filteredComments = comments.filter(
|
||||
comment =>
|
||||
@@ -1065,7 +1065,7 @@ export class IssuesProcessor {
|
||||
this.addedLabelIssues.push(issue);
|
||||
|
||||
try {
|
||||
this.operations.consumeOperation();
|
||||
this._consumeIssueOperation(issue);
|
||||
this.statistics?.incrementAddedItemsLabel(issue);
|
||||
if (!this.options.debugOnly) {
|
||||
await this.client.issues.addLabels({
|
||||
|
||||
Reference in New Issue
Block a user