Browse Source

Try to improve Danger rule for PNGs to ignore screenshots (#234)

test/jme/compound-poc
Jorge Martin Espinosa 2 years ago committed by GitHub
parent
commit
93a77d94c1
  1. 4
      tools/danger/dangerfile.js

4
tools/danger/dangerfile.js

@ -107,7 +107,9 @@ if (hasChangedViews) { @@ -107,7 +107,9 @@ if (hasChangedViews) {
}
// Check for pngs on resources
const hasPngs = editedFiles.filter(file => file.toLowerCase().endsWith(".png")).length > 0
const hasPngs = editedFiles.filter(file => {
file.toLowerCase().endsWith(".png") && !file.includes("snapshots/images/") // Exclude screenshots
}).length > 0
if (hasPngs) {
warn("You seem to have made changes to some images. Please consider using an vector drawable.")
}

Loading…
Cancel
Save