@@ -97,6 +97,8 @@ class Updater {
9797 this . octokit = octokit_1 . createOctokit ( options . token ) ;
9898 this . message = options . message ;
9999 this . defaultBranch = options . branch || null ;
100+ this . committerName = options . committerName ;
101+ this . committerEmail = options . committerEmail ;
100102 }
101103 async updateFiles ( paths ) {
102104 const branch = await this . getBranch ( ) ;
@@ -114,7 +116,10 @@ class Updater {
114116 async createCommit ( tree , parent ) {
115117 const { message } = this ;
116118 const { data } = await this . octokit . git . createCommit ( Object . assign ( Object . assign ( { } , github_1 . context . repo ) , { message,
117- tree, parents : [ parent ] } ) ) ;
119+ tree, parents : [ parent ] , author : {
120+ name : this . committerName ,
121+ email : this . committerEmail ,
122+ } } ) ) ;
118123 return data . sha ;
119124 }
120125 async createTree ( branch , filePaths , base_tree ) {
@@ -224,7 +229,9 @@ function getActionOptions() {
224229 const token = core_1 . getInput ( 'github-token' , { required : true } ) ;
225230 const message = core_1 . getInput ( 'commit-msg' , { required : true } ) ;
226231 const branch = core_1 . getInput ( 'branch' ) ;
227- return { token, message, branch } ;
232+ const committerName = core_1 . getInput ( 'committer-name' ) ;
233+ const committerEmail = core_1 . getInput ( 'committer-email' ) ;
234+ return { token, message, branch, committerName, committerEmail } ;
228235}
229236exports . getActionOptions = getActionOptions ;
230237function isNotNull ( arg ) {
0 commit comments