@@ -118,7 +118,7 @@ class Repository {
118118 } ) ;
119119 }
120120
121- async updateFile ( { filePath, content, branchName, originalSha, convention } ) {
121+ async updateFile ( { filePath, content, branchName, originalSha, convention, commitType } ) {
122122 const contentBinary = Buffer . from ( content ) . toString ( "base64" ) ;
123123
124124 //octokit.github.io/rest.js/#api-Repos-updateFile
@@ -127,7 +127,7 @@ class Repository {
127127 repo : this . repo ,
128128 path : filePath ,
129129 message : convertMessage ( {
130- tag : "docs" ,
130+ tag : commitType ,
131131 msg : `update ${ filePath } ${ this . skipCiString } ` ,
132132 convention,
133133 } ) . trim ( ) ,
@@ -137,7 +137,7 @@ class Repository {
137137 } ) ;
138138 }
139139
140- async createFile ( { filePath, content, branchName, convention } ) {
140+ async createFile ( { filePath, content, branchName, convention, commitType } ) {
141141 const contentBinary = Buffer . from ( content ) . toString ( "base64" ) ;
142142
143143 //octokit.github.io/rest.js/#api-Repos-createFile
@@ -146,7 +146,7 @@ class Repository {
146146 repo : this . repo ,
147147 path : filePath ,
148148 message : convertMessage ( {
149- tag : "docs" ,
149+ tag : commitType ,
150150 msg : `create ${ filePath } ${ this . skipCiString } ` ,
151151 convention,
152152 } ) . trim ( ) ,
@@ -161,21 +161,23 @@ class Repository {
161161 branchName,
162162 originalSha,
163163 convention,
164+ commitType,
164165 } ) {
165166 if ( originalSha === undefined ) {
166- await this . createFile ( { filePath, content, branchName, convention } ) ;
167+ await this . createFile ( { filePath, content, branchName, convention, commitType } ) ;
167168 } else {
168169 await this . updateFile ( {
169170 filePath,
170171 content,
171172 branchName,
172173 originalSha,
173174 convention,
175+ commitType,
174176 } ) ;
175177 }
176178 }
177179
178- async createOrUpdateFiles ( { filesByPath, branchName, convention } ) {
180+ async createOrUpdateFiles ( { filesByPath, branchName, convention, commitType } ) {
179181 const repository = this ;
180182 const createOrUpdateFilesMultiple = Object . entries ( filesByPath ) . map (
181183 ( [ filePath , { content, originalSha } ] ) => {
@@ -185,6 +187,7 @@ class Repository {
185187 branchName,
186188 originalSha,
187189 convention,
190+ commitType,
188191 } ) ;
189192 }
190193 ) ;
@@ -252,6 +255,7 @@ class Repository {
252255 filesByPath,
253256 branchName,
254257 convention,
258+ commitType,
255259 } ) {
256260 const branchNameExists = branchName === this . baseBranch ;
257261 if ( ! branchNameExists ) {
@@ -262,6 +266,7 @@ class Repository {
262266 filesByPath,
263267 branchName,
264268 convention,
269+ commitType,
265270 } ) ;
266271
267272 return this . createPullRequest ( {
0 commit comments