reviewbot

Source code for the is-a.dev r...
Log | Files | Refs | Activity | README | LICENSE

commit dab85ff87f6e0119133a19332d8b9c227b36b67e
parent d9dcfa271d4cdac1a0459d229f8aa1332170646e
Author: Amit Dutta <mail@amit.is-a.dev>
Date:   Sat, 18 Jul 2026 12:53:51 +0530

fix(labeled): fixed the fallback bug for 'status: denied' (#81)

* Add denied pull request message template

* Refactor label message logic in labeled.js

Update webhook message handling for labeled events based on conditions.

* Fix formatting in deniednolabel.md
Diffstat:
Asrc/message/deniednolabel.md | 5+++++
Msrc/webhooks/labeled.js | 15+++++++++++----
2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/message/deniednolabel.md b/src/message/deniednolabel.md @@ -0,0 +1,5 @@ +# Pull Request Denied + +This pull request has been denied. Unfortunately the reviewer didn't specify what is wrong with the pull request. + +If you believe this was a mistake, or if you need further clarification, please feel free to create an issue or reach out to our team in the [Discord server](https://discord.gg/is-a-dev-830872854677422150). diff --git a/src/webhooks/labeled.js b/src/webhooks/labeled.js @@ -96,10 +96,17 @@ export async function labeled( const labelMessages = allMessages.join('\n\n'); let body; if (!labelMessages.length) { - body = fs.readFileSync( - path.join(import.meta.dirname, `../message/invalidnolabel.md`), - 'utf8' - ); + if (denied) { + body = fs.readFileSync( + path.join(import.meta.dirname, `../message/deniednolabel.md`), + 'utf8' + ); + } else if (invalid) { + body = fs.readFileSync( + path.join(import.meta.dirname, `../message/invalidnolabel.md`), + 'utf8' + ); + } } else if (denied) { body = ` # Pull Request Denied
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror