Commit 9278700
Eric Bower
·
2023-08-10 12:46:52 -0400 EDT
parent 60bbeb8
fix: checkout entire git repo in gha
2 files changed,
+15,
-9
+2,
-0
| ... | ... | @@ -8,6 +8,8 @@ jobs: | |
| 8 | 8 | runs-on: ubuntu-latest | |
| 9 | 9 | steps: | |
| 10 | 10 | - uses: actions/checkout@v3 | |
| 11 | + | # need entire history | |
| 12 | + | fetch-depth: 0 | |
| 11 | 13 | - uses: actions/setup-go@v4 | |
| 12 | 14 | with: | |
| 13 | 15 | go-version: '1.20' |
M
main.go
+13,
-9
| ... | ... | @@ -759,6 +759,8 @@ func main() { | |
| 759 | 759 | var assetFlag = flag.Bool("assets", false, "copy static assets to --out") | |
| 760 | 760 | var cloneFlag = flag.String("clone-url", "", "git clone URL") | |
| 761 | 761 | var descFlag = flag.String("desc", "", "description for repo") | |
| 762 | + | var maxCommitsFlag = flag.Int("max-commits", 0, "maximum number of commits to generate") | |
| 763 | + | var hideTreeLastCommitFlag = flag.Bool("hide-tree-last-commit", false, "dont calculate last commit for each file in the tree") | |
| 762 | 764 | ||
| 763 | 765 | flag.Parse() | |
| 764 | 766 |
| ... | ... | @@ -787,15 +789,17 @@ func main() { | |
| 787 | 789 | } | |
| 788 | 790 | ||
| 789 | 791 | config := &Config{ | |
| 790 | - | Outdir: out, | |
| 791 | - | RepoPath: repoPath, | |
| 792 | - | RepoName: label, | |
| 793 | - | Cache: make(map[string]bool), | |
| 794 | - | Revs: revs, | |
| 795 | - | Theme: theme, | |
| 796 | - | Logger: logger, | |
| 797 | - | CloneURL: template.URL(*cloneFlag), | |
| 798 | - | Desc: *descFlag, | |
| 792 | + | Outdir: out, | |
| 793 | + | RepoPath: repoPath, | |
| 794 | + | RepoName: label, | |
| 795 | + | Cache: make(map[string]bool), | |
| 796 | + | Revs: revs, | |
| 797 | + | Theme: theme, | |
| 798 | + | Logger: logger, | |
| 799 | + | CloneURL: template.URL(*cloneFlag), | |
| 800 | + | Desc: *descFlag, | |
| 801 | + | MaxCommits: *maxCommitsFlag, | |
| 802 | + | HideTreeLastCommit: *hideTreeLastCommitFlag, | |
| 799 | 803 | } | |
| 800 | 804 | config.Logger.Infof("%+v", config) | |
| 801 | 805 |