Skip to content

Commit af40726

Browse files
authored
Merge pull request #205 from actions/users/tihuang/untrustedinputs
Not print untrusted info to STDOUT.
2 parents 707ba4d + 658139a commit af40726

File tree

2 files changed

+12
-16
lines changed

2 files changed

+12
-16
lines changed

dist/index.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class IssueProcessor {
7575
}
7676
for (const issue of issues.values()) {
7777
const isPr = !!issue.pull_request;
78-
core.info(`Found issue: issue #${issue.number} - ${issue.title} last updated ${issue.updated_at} (is pr? ${isPr})`);
78+
core.info(`Found issue: issue #${issue.number} last updated ${issue.updated_at} (is pr? ${isPr})`);
7979
// calculate string based messages for this issue
8080
const staleMessage = isPr
8181
? this.options.stalePrMessage
@@ -172,7 +172,7 @@ class IssueProcessor {
172172
// find any comments since the date
173173
const comments = yield this.listIssueComments(issue.number, sinceDate);
174174
const filteredComments = comments.filter(comment => comment.user.type === 'User' && comment.user.login !== github_1.context.actor);
175-
core.info(`Comments not made by ${github_1.context.actor} or another bot: ${filteredComments.length}`);
175+
core.info(`Comments not made by actor or another bot: ${filteredComments.length}`);
176176
// if there are any user comments returned
177177
return filteredComments.length > 0;
178178
});
@@ -222,7 +222,7 @@ class IssueProcessor {
222222
// Mark an issue as stale with a comment and a label
223223
markStale(issue, staleMessage, staleLabel, skipMessage) {
224224
return __awaiter(this, void 0, void 0, function* () {
225-
core.info(`Marking issue #${issue.number} - ${issue.title} as stale`);
225+
core.info(`Marking issue #${issue.number} as stale`);
226226
this.staleIssues.push(issue);
227227
this.operationsLeft -= 2;
228228
// if the issue is being marked stale, the updated date should be changed to right now
@@ -261,7 +261,7 @@ class IssueProcessor {
261261
// Close an issue based on staleness
262262
closeIssue(issue, closeMessage, closeLabel) {
263263
return __awaiter(this, void 0, void 0, function* () {
264-
core.info(`Closing issue #${issue.number} - ${issue.title} for being stale`);
264+
core.info(`Closing issue #${issue.number} for being stale`);
265265
this.closedIssues.push(issue);
266266
this.operationsLeft -= 1;
267267
if (this.options.debugOnly) {
@@ -309,7 +309,7 @@ class IssueProcessor {
309309
// Remove a label from an issue
310310
removeLabel(issue, label) {
311311
return __awaiter(this, void 0, void 0, function* () {
312-
core.info(`Removing label ${label} from issue #${issue.number} - ${issue.title}`);
312+
core.info(`Removing label from issue #${issue.number}`);
313313
this.removedLabelIssues.push(issue);
314314
this.operationsLeft -= 1;
315315
if (this.options.debugOnly) {
@@ -332,7 +332,7 @@ class IssueProcessor {
332332
///see https://developer.github.com/v3/activity/events/
333333
getLabelCreationDate(issue, label) {
334334
return __awaiter(this, void 0, void 0, function* () {
335-
core.info(`Checking for label ${label} on issue #${issue.number}`);
335+
core.info(`Checking for label on issue #${issue.number}`);
336336
this.operationsLeft -= 1;
337337
const options = this.client.issues.listEvents.endpoint.merge({
338338
owner: github_1.context.repo.owner,

src/IssueProcessor.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class IssueProcessor {
115115
const isPr = !!issue.pull_request;
116116

117117
core.info(
118-
`Found issue: issue #${issue.number} - ${issue.title} last updated ${issue.updated_at} (is pr? ${isPr})`
118+
`Found issue: issue #${issue.number} last updated ${issue.updated_at} (is pr? ${isPr})`
119119
);
120120

121121
// calculate string based messages for this issue
@@ -277,7 +277,7 @@ export class IssueProcessor {
277277
);
278278

279279
core.info(
280-
`Comments not made by ${context.actor} or another bot: ${filteredComments.length}`
280+
`Comments not made by actor or another bot: ${filteredComments.length}`
281281
);
282282

283283
// if there are any user comments returned
@@ -336,7 +336,7 @@ export class IssueProcessor {
336336
staleLabel: string,
337337
skipMessage: boolean
338338
): Promise<void> {
339-
core.info(`Marking issue #${issue.number} - ${issue.title} as stale`);
339+
core.info(`Marking issue #${issue.number} as stale`);
340340

341341
this.staleIssues.push(issue);
342342

@@ -382,9 +382,7 @@ export class IssueProcessor {
382382
closeMessage?: string,
383383
closeLabel?: string
384384
): Promise<void> {
385-
core.info(
386-
`Closing issue #${issue.number} - ${issue.title} for being stale`
387-
);
385+
core.info(`Closing issue #${issue.number} for being stale`);
388386

389387
this.closedIssues.push(issue);
390388

@@ -434,9 +432,7 @@ export class IssueProcessor {
434432

435433
// Remove a label from an issue
436434
private async removeLabel(issue: Issue, label: string): Promise<void> {
437-
core.info(
438-
`Removing label ${label} from issue #${issue.number} - ${issue.title}`
439-
);
435+
core.info(`Removing label from issue #${issue.number}`);
440436

441437
this.removedLabelIssues.push(issue);
442438

@@ -464,7 +460,7 @@ export class IssueProcessor {
464460
issue: Issue,
465461
label: string
466462
): Promise<string | undefined> {
467-
core.info(`Checking for label ${label} on issue #${issue.number}`);
463+
core.info(`Checking for label on issue #${issue.number}`);
468464

469465
this.operationsLeft -= 1;
470466

0 commit comments

Comments
 (0)