GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: add method to get commit date from git by trim21 · Pull Request #489 · docker/actions-toolkit Conversation
|
| public static async commitDate(ref: string, gitDir: string | undefined = undefined): Promise<Date> { | ||
| const args = ['show', '-s', '--format="%ci"', ref]; | ||
| if (gitDir !== undefined) { | ||
| args.push('--'); | ||
| args.push(gitDir); | ||
| } | ||
|
|
||
| return new Date(await Git.exec(args)); | ||
| } |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Don't think we need a gitDir opt like other methods we have:
public static async commitDate(ref: string): Promise<Date> { return new Date(await Git.exec(['show', '-s', '--format="%ci"', ref])); }
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Trim21 <[email protected]>
ca3f52f to
31cb9c3
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.