Comment is too spammy
mandolaerik opened this issue ยท 7 comments
Hi,
The default message is too spammy in my taste, I much prefer a minimal clean comment as seen in https://github.com/Levi-Lesches/blocking-issues
I have created a fork that adapts Dependent Issues to something similar: https://github.com/mandolaerik/dependent-issues
Would it make sense to at least make this configurable?
Would it make sense to at least make this configurable?
๐ฏ. Would you be able to work on that?
We could support {{ dependencies }}
token so you can place the list wherever you want. For example
# ...
with:
comment:
"This PR is blocked by:
{{ dependencies }}
Have a nice day!"
In the code we could do a simple match and replace:
customMessage.replace(/\{\{\s*dependencies\s*\}\}/i, dependenciesString)
I guess that's pretty much it.
I could look into it. However, I have some problems with the build/test workflow; I'm new to yarn
(I managed to run tests, but could not compile into index.js; I patched it manually in my fork to get the job done). What's the steps for building what's needed for a PR?
Try running the following commands @mandolaerik :
yarn build # should compile TypeScript files
yarn package # Should bundle files into a single dist/index.js file. See https://github.com/vercel/ncc
I should add a contributing guide ๐
Build gives me:
$ yarn build
yarn run v1.22.10
$ tsc
src/action.ts:13:18 - error TS2571: Object is of type 'unknown'.
13 core.setFailed(error.stack || error.message);
~~~~~
src/action.ts:13:33 - error TS2571: Object is of type 'unknown'.
13 core.setFailed(error.stack || error.message);
~~~~~
Found 2 errors.
Works after this patch:
--- a/src/action.ts
+++ b/src/action.ts
@@ -10,6 +10,10 @@ export async function start() {
try {
await checkIssues(await getActionContext());
} catch (error) {
- core.setFailed(error.stack || error.message);
+ if (error instanceof Error) {
+ core.setFailed(error.stack || error.message);
+ } else {
+ core.setFailed(`${error}`);
+ }
}
}
It looks you're using a later version of Typescript
Anyway, the patch you did looks great ๐
๐ This issue has been resolved in version 1.5.0 ๐
The release is available on GitHub release
Your semantic-release bot ๐ฆ๐