mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
20 lines
676 B
TypeScript
20 lines
676 B
TypeScript
|
import { DangerDSLType, DangerResults } from "danger";
|
||
|
declare const danger: DangerDSLType;
|
||
|
declare const warn: (message: string, results?: DangerResults) => void;
|
||
|
|
||
|
/**
|
||
|
* Check if pull request has has a sufficiently accurate description
|
||
|
*
|
||
|
* @dangerjs WARN
|
||
|
*/
|
||
|
export default function (): void {
|
||
|
const prDescription: string = danger.github.pr.body;
|
||
|
const shortPrDescriptionThreshold: number = 100; // Description is considered too short below this number of characters
|
||
|
|
||
|
if (prDescription.length < shortPrDescriptionThreshold) {
|
||
|
return warn(
|
||
|
"The PR description looks very brief, please check if more details can be added."
|
||
|
);
|
||
|
}
|
||
|
}
|