Skip to content

Commit 8506a2c

Browse files
committed
chore(action): remove unused members from ICommit
1 parent 8282792 commit 8506a2c

File tree

3 files changed

+2
-48
lines changed

3 files changed

+2
-48
lines changed

lib/action/index.js

+1-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/cli/index.js

+1-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datasources.ts

-18
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@ import * as github from "@actions/github";
1111
* Commit information
1212
* @interface ICommit
1313
* @member hash The commit hash
14-
* @member date The commit date
1514
* @member message The commit message
1615
* @member body The commit body
17-
* @member author The commit author name (.name) and email (.email)
1816
*/
1917
interface ICommit {
2018
hash: string;
21-
date: string;
2219
message: string;
2320
body: string;
24-
author: { name: string; email: string };
2521
}
2622

2723
/** DataSource abstraction interface
@@ -51,13 +47,8 @@ class GitSource implements IDataSource {
5147
return data.all.map((commit: any) => {
5248
return {
5349
hash: commit.hash,
54-
date: commit.date,
5550
message: commit.message,
5651
body: commit.body,
57-
author: {
58-
name: commit.author_name,
59-
email: commit.author_email,
60-
},
6152
} as ICommit;
6253
});
6354
}
@@ -85,13 +76,8 @@ class GitHubSource implements IDataSource {
8576
const result = commits.data.map((commit: any) => {
8677
return {
8778
hash: commit.sha,
88-
date: commit.commit.author.date,
8979
message: commit.commit.message.split("\n")[0],
9080
body: "", // TODO: Validate commit body
91-
author: {
92-
name: commit.author.name,
93-
email: commit.author.email,
94-
},
9581
} as ICommit;
9682
});
9783

@@ -104,10 +90,6 @@ class GitHubSource implements IDataSource {
10490
hash: `#${pullRequest.number}`,
10591
message: pullRequest.title,
10692
body: pullRequest.body,
107-
author: {
108-
name: pullRequest.user.login,
109-
email: "", // TODO: Consider what to do with this metadata
110-
},
11193
});
11294

11395
return result;

0 commit comments

Comments
 (0)