Repository navigation
checkout v2 - #70
checkout v2#70
Conversation
| import * as io from '@actions/io'; | ||
| import * as path from 'path'; | ||
|
|
||
| export interface IGitCommandManager { |
There was a problem hiding this comment.
this is a wrapper over git.exe and exposes methods that correlate 1-to-1 with the git commands we need to run.
| tryReset(): Promise<boolean>; | ||
| } | ||
|
|
||
| export async function CreateCommandManager( |
There was a problem hiding this comment.
we need to do some async stuff when initializing the GitCommandManager class, so this function is exposed and the ctor for GitCommandManager is private
|
|
||
| let authConfigKey = `http.https://github.com/.extraheader`; | ||
|
|
||
| export async function getSource( |
There was a problem hiding this comment.
here is the source provider. this basically drives the business logic
| import * as path from 'path'; | ||
|
|
||
| async function run() { | ||
| try { |
There was a problem hiding this comment.
add comment here about using error to break out of the method since there are methods below with side effects like error conditions that we expect to happen and stop continuation (and that is fully okay)
There was a problem hiding this comment.
i dont understand what the concern is?
note, i renamed the file to main.ts so it should be more clear this is the outer try/catch
| @@ -0,0 +1,58 @@ | |||
| { | |||
There was a problem hiding this comment.
copied from actions/toolkit
| @@ -0,0 +1,11 @@ | |||
| { | |||
There was a problem hiding this comment.
copied from actions toolkit
| branches: | ||
| - master | ||
| - 'releases/*' | ||
| - users/ericsciple/action |
There was a problem hiding this comment.
remove this line after done testing
| path.join(__dirname, 'problem-matcher.json') | ||
| ) | ||
|
|
||
| // Get sources |
There was a problem hiding this comment.
add persist-credentials input
| @@ -0,0 +1,77 @@ | |||
| import * as fs from 'fs' | |||
There was a problem hiding this comment.
some useful helpers i think we should add to the toolkit.... separate pr
8169c1f to
212519b
Compare
| Basic: | ||
| # Usage | ||
|
|
||
| <!-- start usage --> |
There was a problem hiding this comment.
i added a script to regenerate this from the action.yml
the CI verifies the docs are up to date
| // | ||
| // This script rebuilds the usage section in the README.md to be consistent with the action.yml | ||
|
|
||
| function updateUsage( |
There was a problem hiding this comment.
we may want to move this function into a toolkit module
i added this based on feedback that the README.md should contain the inputs.
I didnt want to have to deal with maintaining both places, so now the CI runs the npm run gendocs and fails if it isnt up to date
| } | ||
| } | ||
|
|
||
| checkMinimum(minimum: GitVersion): boolean { |
There was a problem hiding this comment.
I would add access modifiers to these methods to make them clear
There was a problem hiding this comment.
+1 however the prettier config didnt like it.
| lfs: boolean, | ||
| accessToken: string | ||
| ): Promise<void> { | ||
| core.info(`Syncing repository: ${repositoryOwner}/${repositoryName}`) |
There was a problem hiding this comment.
you're missing a lot of line ending semicolons. not sure if this is intentional or not
There was a problem hiding this comment.
that's the prettier config. personally i think its weird but i just copied the config from the toolkit 🤷♂
|
LGTM 👍 |
4f1367e to
fb4e2f6
Compare
No description provided.