Danger: don't warn about changelog for docs, CI, etc

merge-requests/2012/head
Alex Gleason 2022-12-17 10:41:00 -06:00
rodzic af4e8765fd
commit 8f2a1fb6ef
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

@ -1,5 +1,8 @@
import { danger, warn, message } from 'danger';
// App changes
const app = danger.git.fileMatch('app/soapbox/**');
// Docs changes
const docs = danger.git.fileMatch('docs/**/*.md');
@ -10,7 +13,7 @@ if (docs.edited) {
// Enforce CHANGELOG.md additions
const changelog = danger.git.fileMatch('CHANGELOG.md');
if (!changelog.edited) {
if (app.edited && !changelog.edited) {
warn('You have not updated `CHANGELOG.md`. If this change directly impacts admins or users, please update the changelog. Otherwise you can ignore this message. See: https://keepachangelog.com');
}