Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocks PRs which change the package version, and fixes CI #916

Merged
merged 2 commits into from
Sep 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ matrix:
source/platforms/git/_tests/local_dangerfile_example.ts || echo "Skipping Danger Local for non PR run"'

# Create some fake projects at runtime
- node_js: "8"
- node_js: "10.16"
script:
- echo "This is only for Integration tests on two blank projects"
- yarn build
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

<!-- Your comment below this -->

<!-- Your comment above this -->

- Improve docs for GitHub Actions - [@nguyenhuy]

# 9.1.8
Expand Down
6 changes: 6 additions & 0 deletions dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export default async () => {
// Some libraries
await yarn()
await jest()

// Don't have folks setting the package json version
const packageDiff = await danger.git.JSONDiffForFile("package.json")
if (packageDiff.version && danger.github.pr.user.login !== "orta") {
fail("Please don't make package version changes")
}
}

// Re-run the git push hooks
Expand Down