File tree 3 files changed +15
-9
lines changed
3 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ function rewriteCopyrightLine(contents) {
76
76
return newLines . join ( '\n' ) ;
77
77
}
78
78
79
- async function doLicenseCommit ( changedFiles ) {
79
+ async function doLicense ( changedFiles ) {
80
80
const licenseSpinner = ora ( ' Validating License Headers' ) . start ( ) ;
81
81
82
82
const paths = changedFiles . filter ( line => line . match ( / ( j s | t s ) $ / ) ) ;
@@ -115,7 +115,7 @@ async function doLicenseCommit(changedFiles) {
115
115
symbol : '✅'
116
116
} ) ;
117
117
118
- // Diff unstaged (prettier writes) against staged.
118
+ // Diff unstaged (license writes) against staged.
119
119
const stageDiff = await git . diff ( [ '--name-only' ] ) ;
120
120
121
121
if ( ! stageDiff ) {
@@ -136,5 +136,5 @@ async function doLicenseCommit(changedFiles) {
136
136
}
137
137
138
138
module . exports = {
139
- doLicenseCommit
139
+ doLicense
140
140
} ;
Original file line number Diff line number Diff line change 15
15
* limitations under the License.
16
16
*/
17
17
18
- const { doPrettierCommit } = require ( './prettier' ) ;
19
- const { doLicenseCommit } = require ( './license' ) ;
18
+ const { doPrettier } = require ( './prettier' ) ;
19
+ const { doLicense } = require ( './license' ) ;
20
20
const { resolve } = require ( 'path' ) ;
21
21
const simpleGit = require ( 'simple-git/promise' ) ;
22
22
const ora = require ( 'ora' ) ;
@@ -75,11 +75,17 @@ $ git stash pop
75
75
const changedFiles = diff . split ( '\n' ) ;
76
76
77
77
// Style the code
78
- await doPrettierCommit ( changedFiles ) ;
78
+ await doPrettier ( changedFiles ) ;
79
79
80
80
// Validate License headers exist
81
- await doLicenseCommit ( changedFiles ) ;
81
+ await doLicense ( changedFiles ) ;
82
82
83
+ < << << << HEAD
84
+ = === ===
85
+ // Generate API reports
86
+ await doApiReports ( changedFiles ) ;
87
+
88
+ > >>> >>> 391 f3e4b ... Address some PR comments
83
89
// Diff staged changes against last commit. Don't do an empty commit.
84
90
const postDiff = await git . diff ( [ '--cached' ] ) ;
85
91
if ( ! postDiff ) {
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ function checkVersion() {
56
56
} ) ;
57
57
}
58
58
59
- async function doPrettierCommit ( changedFiles ) {
59
+ async function doPrettier ( changedFiles ) {
60
60
try {
61
61
await checkVersion ( ) ;
62
62
} catch ( e ) {
@@ -108,5 +108,5 @@ async function doPrettierCommit(changedFiles) {
108
108
}
109
109
110
110
module . exports = {
111
- doPrettierCommit
111
+ doPrettier
112
112
} ;
You can’t perform that action at this time.
0 commit comments