File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Check Changeset
2
+
3
+ on : pull_request
4
+
5
+ jobs :
6
+ check_changeset :
7
+ name : Check changeset vs changed files
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - uses : actions/checkout@v2
12
+ - name : Checkout
13
+ run : |
14
+ git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
15
+ - name : Set up Node (10)
16
+ uses : actions/setup-node@v1
17
+ with :
18
+ node-version : 10.x
19
+ - name : Yarn install
20
+ run : yarn
21
+ - name : Run changeset script
22
+ run : yarn ts-node-script scripts/check_changeset.ts
23
+ id : check-changeset
24
+ - name : Read output
25
+ run : echo env.MISSING_PACKAGES
Original file line number Diff line number Diff line change @@ -85,7 +85,16 @@ async function main() {
85
85
const missingPackages = changedPackages . filter (
86
86
changedPkg => ! changesetPackages . includes ( changedPkg )
87
87
) ;
88
- console . log ( missingPackages ) ;
88
+ if ( missingPackages . length > 0 ) {
89
+ // console.warn(chalk.yellow(`Warning: The following packages were `
90
+ // + `changed but not added to the changeset file, make sure this was `
91
+ // + `intentional:\n${missingPackages.join('\n')}`));
92
+ // process.exit(1);
93
+ console . log (
94
+ `::set-env name=MISSING_PACKAGES::${ missingPackages . join ( ',' ) } `
95
+ ) ;
96
+ }
97
+ process . exit ( ) ;
89
98
}
90
99
} catch ( e ) {
91
100
console . error ( chalk `{red ${ e } }` ) ;
You can’t perform that action at this time.
0 commit comments