generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
We could validate the commit hash (40 characters):
export class CommitHash {
value: string
constructor(value: string) {
// TODO: validation
this.value = value
}
...
}
And short commit hash (7 character):
export class ShortCommitHash implements Nullable {
private value: string
constructor(value: string) {
// TODO: validation
this.value = value
}
...
}
Sample implementation: https://github.com/kensho-technologies/check-more-types/blob/5356e344fc64f8130ee1f17de293abda695cf015/src/git.js#L35-L39
We wanted to force to use always the 40-character version to avoid ambiguity, but SimpleGit commit returns the short version. We could use our SimpleGit wrapper to change that behaviour and use always long hashes.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers