-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdangerfile.js
More file actions
18 lines (15 loc) · 756 Bytes
/
dangerfile.js
File metadata and controls
18 lines (15 loc) · 756 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { warn } from "danger"
// Rule n°1:
// If a developer has to modify a flow file in 'flow-typed/PackageTypes'
// there is chance he is making a breaking change
const modifiedExportedFlowFiles = danger.git.modified_files
.filter(x => x.includes('flow-typed/PackageTypes'))
.join(`
- `)
if (modifiedExportedFlowFiles) {
warn(`## Breaking changes risk:
You changed the exported flow types, be careful because this might indicate a breaking change.
Find [here how to anticipate breaking changes on Shared Components](https://github.com/shared-components/shared-components/blob/master/documentation/technical-standards/reusable-packages.md#breaking-changes).
The list of exported Flow files you changed:
- ${modifiedExportedFlowFiles}`)
}