forked from getsentry/sentry-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add danger * feat: Add travis danger job * meta: Add sizecheck to danger * ref: Delete dead code
- Loading branch information
Showing
6 changed files
with
309 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
yarn | ||
# We have to build it first, so that TypeScript Types are recognized correctly | ||
yarn build | ||
yarn danger ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,3 @@ yarn | |
# We have to build it first, so that TypeScript Types are recognized correctly | ||
yarn build | ||
yarn lint | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { exec } from 'child_process'; | ||
import { danger, message, schedule, warn } from 'danger'; | ||
import { promisify } from 'util'; | ||
|
||
export default async () => { | ||
if (!danger.github) { | ||
return; | ||
} | ||
|
||
const hasChangelog = danger.git.modified_files.indexOf('CHANGELOG.md') !== -1; | ||
const isTrivial = (danger.github.pr.body + danger.github.pr.title).includes('#trivial'); | ||
|
||
if (!hasChangelog && !isTrivial) { | ||
warn('Please add a changelog entry for your changes.'); | ||
} | ||
|
||
schedule(async () => { | ||
const result = (await promisify(exec)('cd packages/browser; yarn size:check')).stdout; | ||
message(`@sentry/browser gzip minified size: ${result.split('\n')[1]}`); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.