forked from microsoft/TypeScript-Website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdangerfile.ts
More file actions
21 lines (17 loc) · 700 Bytes
/
dangerfile.ts
File metadata and controls
21 lines (17 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { danger, message } from "danger";
// dangerfile.js
import spellcheck from "danger-plugin-spellcheck";
const hasElevatedAccess =
danger.github.pr.author_association === "COLLABORATOR" ||
danger.github.pr.author_association === "OWNER" ||
danger.github.pr.author_association === "MEMBER";
// Run the spell check only on PRs from staff
if (hasElevatedAccess) {
spellcheck({
settings: "artsy/peril-settings@spellcheck.json",
codeSpellCheck: ["Examples/**/*.ts", "Examples/**/*.js"]
});
// This deploy only happens for staff also
const deployURL = `https://typescript-site-${danger.github.pr.number}.ortam.now.sh`;
message(`Deployed to [a PR branch](${deployURL})`);
}