You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added ability to pass in an optional PR number as a parameter (#349)
* Adding pr-number as an optional parameter
* Updated README
* Tests on the pr-number parameter
* Added missing | to table
* re-built script
* Adding support for multiple pr-numbers
* excluded .idea
* Updated readme to reflect that there might be more than one PR
* Additional warning
* Removed unused
* Reformatted and re-built
* Corrected message
* Removed required check
* Added (s) to pull request numbers in the description
Co-authored-by: MaksimZhukov <[email protected]>
* Reworded PR-number parameter description
Co-authored-by: MaksimZhukov <[email protected]>
* adding getMultilineInput into the tests
* Fixing tests for single pr
* Fixing tests for multiple prs
* Updated README.md to make it more obvious that it can take a list of PRs
* Added example that labels PR's 1-3
* Handled no pull requests better (from code review)
* Handled no pull requests better (from code review)
* Handled missing pull request better (from code review)
* Back out suggested change as it broke the tests
* Rebuilt dist
* Update src/labeler.ts
Co-authored-by: MaksimZhukov <[email protected]>
* Added Emphasis to the note
Co-authored-by: MaksimZhukov <[email protected]>
* Changed mockInput for pr-number to be string[]
---------
Co-authored-by: MaksimZhukov <[email protected]>
for (const [label, globs] of labelGlobs.entries()) {
84
+
core.debug(`processing ${label}`);
85
+
if (checkGlobs(changedFiles, globs, dot)) {
86
+
allLabels.add(label);
87
+
}
88
+
else if (syncLabels) {
89
+
allLabels.delete(label);
90
+
}
94
91
}
95
-
}
96
-
catch (error) {
97
-
if (error.name === 'HttpError' &&
98
-
error.message === 'Resource not accessible by integration') {
99
-
core.warning(`The action requires write permission to add labels to pull requests. For more information please refer to the action documentation: https://github.com/actions/labeler#permissions`, {
100
-
title: `${process.env['GITHUB_ACTION_REPOSITORY']} running under '${github.context.eventName}' is misconfigured`
core.warning(`Maximum of ${GITHUB_MAX_LABELS} labels allowed. Excess labels: ${excessLabels.join(', ')}`, { title: 'Label limit for a PR exceeded' });
104
+
}
103
105
}
104
-
else {
105
-
throw error;
106
+
catch (error) {
107
+
if (error.name === 'HttpError' &&
108
+
error.message === 'Resource not accessible by integration') {
109
+
core.warning(`The action requires write permission to add labels to pull requests. For more information please refer to the action documentation: https://github.com/actions/labeler#permissions`, {
110
+
title: `${process.env['GITHUB_ACTION_REPOSITORY']} running under '${github.context.eventName}' is misconfigured`
0 commit comments