@@ -11,17 +11,13 @@ import * as github from "@actions/github";
11
11
* Commit information
12
12
* @interface ICommit
13
13
* @member hash The commit hash
14
- * @member date The commit date
15
14
* @member message The commit message
16
15
* @member body The commit body
17
- * @member author The commit author name (.name) and email (.email)
18
16
*/
19
17
interface ICommit {
20
18
hash : string ;
21
- date : string ;
22
19
message : string ;
23
20
body : string ;
24
- author : { name : string ; email : string } ;
25
21
}
26
22
27
23
/** DataSource abstraction interface
@@ -51,13 +47,8 @@ class GitSource implements IDataSource {
51
47
return data . all . map ( ( commit : any ) => {
52
48
return {
53
49
hash : commit . hash ,
54
- date : commit . date ,
55
50
message : commit . message ,
56
51
body : commit . body ,
57
- author : {
58
- name : commit . author_name ,
59
- email : commit . author_email ,
60
- } ,
61
52
} as ICommit ;
62
53
} ) ;
63
54
}
@@ -85,13 +76,8 @@ class GitHubSource implements IDataSource {
85
76
const result = commits . data . map ( ( commit : any ) => {
86
77
return {
87
78
hash : commit . sha ,
88
- date : commit . commit . author . date ,
89
79
message : commit . commit . message . split ( "\n" ) [ 0 ] ,
90
80
body : "" , // TODO: Validate commit body
91
- author : {
92
- name : commit . author . name ,
93
- email : commit . author . email ,
94
- } ,
95
81
} as ICommit ;
96
82
} ) ;
97
83
@@ -104,10 +90,6 @@ class GitHubSource implements IDataSource {
104
90
hash : `#${ pullRequest . number } ` ,
105
91
message : pullRequest . title ,
106
92
body : pullRequest . body ,
107
- author : {
108
- name : pullRequest . user . login ,
109
- email : "" , // TODO: Consider what to do with this metadata
110
- } ,
111
93
} ) ;
112
94
113
95
return result ;
0 commit comments