@@ -661,12 +661,14 @@ class IssuesProcessor {
661661 this . _consumeIssueOperation ( issue ) ;
662662 ( _b = this . _statistics ) === null || _b === void 0 ? void 0 : _b . incrementAddedItemsLabel ( issue ) ;
663663 ( _c = this . _statistics ) === null || _c === void 0 ? void 0 : _c . incrementStaleItemsCount ( issue ) ;
664- yield this . client . issues . addLabels ( {
665- owner : github_1 . context . repo . owner ,
666- repo : github_1 . context . repo . repo ,
667- issue_number : issue . number ,
668- labels : [ staleLabel ]
669- } ) ;
664+ if ( ! this . options . debugOnly ) {
665+ yield this . client . issues . addLabels ( {
666+ owner : github_1 . context . repo . owner ,
667+ repo : github_1 . context . repo . repo ,
668+ issue_number : issue . number ,
669+ labels : [ staleLabel ]
670+ } ) ;
671+ }
670672 }
671673 catch ( error ) {
672674 issueLogger . error ( `Error when adding a label: ${ error . message } ` ) ;
@@ -701,12 +703,14 @@ class IssuesProcessor {
701703 try {
702704 this . _consumeIssueOperation ( issue ) ;
703705 ( _b = this . _statistics ) === null || _b === void 0 ? void 0 : _b . incrementAddedItemsLabel ( issue ) ;
704- yield this . client . issues . addLabels ( {
705- owner : github_1 . context . repo . owner ,
706- repo : github_1 . context . repo . repo ,
707- issue_number : issue . number ,
708- labels : [ closeLabel ]
709- } ) ;
706+ if ( ! this . options . debugOnly ) {
707+ yield this . client . issues . addLabels ( {
708+ owner : github_1 . context . repo . owner ,
709+ repo : github_1 . context . repo . repo ,
710+ issue_number : issue . number ,
711+ labels : [ closeLabel ]
712+ } ) ;
713+ }
710714 }
711715 catch ( error ) {
712716 issueLogger . error ( `Error when adding a label: ${ error . message } ` ) ;
@@ -715,12 +719,14 @@ class IssuesProcessor {
715719 try {
716720 this . _consumeIssueOperation ( issue ) ;
717721 ( _c = this . _statistics ) === null || _c === void 0 ? void 0 : _c . incrementClosedItemsCount ( issue ) ;
718- yield this . client . issues . update ( {
719- owner : github_1 . context . repo . owner ,
720- repo : github_1 . context . repo . repo ,
721- issue_number : issue . number ,
722- state : 'closed'
723- } ) ;
722+ if ( ! this . options . debugOnly ) {
723+ yield this . client . issues . update ( {
724+ owner : github_1 . context . repo . owner ,
725+ repo : github_1 . context . repo . repo ,
726+ issue_number : issue . number ,
727+ state : 'closed'
728+ } ) ;
729+ }
724730 }
725731 catch ( error ) {
726732 issueLogger . error ( `Error when updating this $$type: ${ error . message } ` ) ;
@@ -734,14 +740,12 @@ class IssuesProcessor {
734740 try {
735741 this . _consumeIssueOperation ( issue ) ;
736742 ( _a = this . _statistics ) === null || _a === void 0 ? void 0 : _a . incrementFetchedPullRequestsCount ( ) ;
737- if ( ! this . options . debugOnly ) {
738- const pullRequest = yield this . client . pulls . get ( {
739- owner : github_1 . context . repo . owner ,
740- repo : github_1 . context . repo . repo ,
741- pull_number : issue . number
742- } ) ;
743- return pullRequest . data ;
744- }
743+ const pullRequest = yield this . client . pulls . get ( {
744+ owner : github_1 . context . repo . owner ,
745+ repo : github_1 . context . repo . repo ,
746+ pull_number : issue . number
747+ } ) ;
748+ return pullRequest . data ;
745749 }
746750 catch ( error ) {
747751 issueLogger . error ( `Error when getting this $$type: ${ error . message } ` ) ;
0 commit comments