Skip to content

Commit

Permalink
chore(assignees): add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
C0ZEN committed Sep 19, 2021
1 parent 303465a commit 7bfcefb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
17 changes: 13 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ exports.Issue = void 0;
const is_labeled_1 = __nccwpck_require__(6792);
const is_pull_request_1 = __nccwpck_require__(5400);
const operations_1 = __nccwpck_require__(7957);
const logger_1 = __nccwpck_require__(6212);
class Issue {
constructor(options, issue) {
this.operations = new operations_1.Operations();
Expand All @@ -228,6 +229,10 @@ class Issue {
this.locked = issue.locked;
this.milestone = issue.milestone;
this.assignees = issue.assignees;
// @todo remove this log
const logger = new logger_1.Logger();
logger.info('Assignees:');
logger.info(...this.assignees.map((assignee) => JSON.stringify(assignee)));
this.isStale = is_labeled_1.isLabeled(this, this.staleLabel);
}
get isPullRequest() {
Expand Down Expand Up @@ -819,7 +824,11 @@ class IssuesProcessor {
var _a;
return __awaiter(this, void 0, void 0, function* () {
const issueLogger = new issue_logger_1.IssueLogger(issue);
issueLogger.info(`Delete branch from closed $$type - ${issue.title}`);
issueLogger.info(`Delete
branch from closed $
$type
-
${issue.title}`);
const pullRequest = yield this._getPullRequest(issue);
if (!pullRequest) {
issueLogger.info(`Not deleting this branch as no pull request was found for this $$type`);
Expand Down Expand Up @@ -9085,12 +9094,12 @@ module.exports = require("zlib");;
/******/ /* webpack/runtime/compat */
/******/
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";/************************************************************************/
/******/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module is referenced by other modules so it can't be inlined
/******/ var __webpack_exports__ = __nccwpck_require__(3109);
/******/ module.exports = __webpack_exports__;
/******/
/******/
/******/ })()
;
;
6 changes: 5 additions & 1 deletion src/classes/issues-processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,11 @@ export class IssuesProcessor {
private async _deleteBranch(issue: Issue): Promise<void> {
const issueLogger: IssueLogger = new IssueLogger(issue);

issueLogger.info(`Delete branch from closed $$type - ${issue.title}`);
issueLogger.info(`Delete
branch from closed $
$type
-
${issue.title}`);

const pullRequest = await this._getPullRequest(issue);

Expand Down

0 comments on commit 7bfcefb

Please sign in to comment.