mirror of
https://github.com/actions/stale.git
synced 2025-12-25 17:58:17 +00:00
Compare commits
4 Commits
v3
...
issue-comm
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc8ff56517 | ||
|
|
ab559aee86 | ||
|
|
ffc3c749f4 | ||
|
|
93db9b6708 |
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -411,8 +411,10 @@ class IssuesProcessor {
|
|||||||
try {
|
try {
|
||||||
this._operationsLeft -= 1;
|
this._operationsLeft -= 1;
|
||||||
actor = yield this.client.users.getAuthenticated();
|
actor = yield this.client.users.getAuthenticated();
|
||||||
|
this._logger.info('Actor is from client');
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
this._logger.info('Actor is from context');
|
||||||
return github_1.context.actor;
|
return github_1.context.actor;
|
||||||
}
|
}
|
||||||
return actor.data.login;
|
return actor.data.login;
|
||||||
@@ -515,6 +517,7 @@ class IssuesProcessor {
|
|||||||
}
|
}
|
||||||
// find any comments since the date
|
// find any comments since the date
|
||||||
const comments = yield this.listIssueComments(issue.number, sinceDate);
|
const comments = yield this.listIssueComments(issue.number, sinceDate);
|
||||||
|
issueLogger.info('Not filtering for debug purposes');
|
||||||
const filteredComments = comments.filter(comment => comment.user.type === 'User' && comment.user.login !== actor);
|
const filteredComments = comments.filter(comment => comment.user.type === 'User' && comment.user.login !== actor);
|
||||||
issueLogger.info(`Comments not made by actor or another bot: ${filteredComments.length}`);
|
issueLogger.info(`Comments not made by actor or another bot: ${filteredComments.length}`);
|
||||||
// if there are any user comments returned
|
// if there are any user comments returned
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {context, getOctokit} from '@actions/github';
|
import {context, getOctokit} from '@actions/github';
|
||||||
import {GitHub} from '@actions/github/lib/utils';
|
import {GitHub} from '@actions/github/lib/utils';
|
||||||
import {GetResponseTypeFromEndpointMethod} from '@octokit/types';
|
import {GetResponseTypeFromEndpointMethod} from '@octokit/types';
|
||||||
|
import { coerce } from 'semver';
|
||||||
import {getHumanizedDate} from '../functions/dates/get-humanized-date';
|
import {getHumanizedDate} from '../functions/dates/get-humanized-date';
|
||||||
import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than';
|
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';
|
||||||
@@ -306,7 +307,9 @@ export class IssuesProcessor {
|
|||||||
try {
|
try {
|
||||||
this._operationsLeft -= 1;
|
this._operationsLeft -= 1;
|
||||||
actor = await this.client.users.getAuthenticated();
|
actor = await this.client.users.getAuthenticated();
|
||||||
|
this._logger.info('Actor is from client')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
this._logger.info('Actor is from context')
|
||||||
return context.actor;
|
return context.actor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -456,6 +459,7 @@ export class IssuesProcessor {
|
|||||||
// find any comments since the date
|
// find any comments since the date
|
||||||
const comments = await this.listIssueComments(issue.number, sinceDate);
|
const comments = await this.listIssueComments(issue.number, sinceDate);
|
||||||
|
|
||||||
|
issueLogger.info('Not filtering for debug purposes')
|
||||||
const filteredComments = comments.filter(
|
const filteredComments = comments.filter(
|
||||||
comment => comment.user.type === 'User' && comment.user.login !== actor
|
comment => comment.user.type === 'User' && comment.user.login !== actor
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user