Skip to content

Commit 8c76204

Browse files
committed
fix docs and lint
1 parent f52bf7d commit 8c76204

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,8 @@ Two special environment variables are passed to the render command:
587587

588588
## Migrations (`migrations`)
589589

590-
- `RETRY_MAX_TIMES`: **3**: Retry times on migrations for every http/https request.
591-
- `RETRY_DELAY`: **3**: Time as seconds to delay before next retry.
590+
- `MAX_ATTEMPTS`: **3**: Max attempts per http/https request on migrations.
591+
- `RETRY_BACKOFF`: **3**: Backoff time per http/https request retry (seconds)
592592

593593
## Other (`other`)
594594

docs/content/doc/advanced/config-cheat-sheet.zh-cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ IS_INPUT_FILE = false
274274

275275
## Migrations (`migrations`)
276276

277-
- `RETRY_MAX_TIMES`: **3**: 在迁移过程中的 http/https 请求重试次数。
278-
- `RETRY_DELAY`: **3**: 等待下一次重试的时间,单位秒。
277+
- `MAX_ATTEMPTS`: **3**: 在迁移过程中的 http/https 请求重试次数。
278+
- `RETRY_BACKOFF`: **3**: 等待下一次重试的时间,单位秒。
279279

280280
## Other (`other`)
281281

modules/migrations/base/downloader.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func NewRetryDownloader(downloader Downloader, retryTimes, retryDelay int) *Retr
4646
}
4747
}
4848

49+
// GetRepoInfo returns a repository information with retry
4950
func (d *RetryDownloader) GetRepoInfo() (*Repository, error) {
5051
var (
5152
times = d.RetryTimes
@@ -61,6 +62,7 @@ func (d *RetryDownloader) GetRepoInfo() (*Repository, error) {
6162
return nil, err
6263
}
6364

65+
// GetTopics returns a repository's topics with retry
6466
func (d *RetryDownloader) GetTopics() ([]string, error) {
6567
var (
6668
times = d.RetryTimes
@@ -76,6 +78,7 @@ func (d *RetryDownloader) GetTopics() ([]string, error) {
7678
return nil, err
7779
}
7880

81+
// GetMilestones returns a repository's milestones with retry
7982
func (d *RetryDownloader) GetMilestones() ([]*Milestone, error) {
8083
var (
8184
times = d.RetryTimes
@@ -91,6 +94,7 @@ func (d *RetryDownloader) GetMilestones() ([]*Milestone, error) {
9194
return nil, err
9295
}
9396

97+
// GetReleases returns a repository's releases with retry
9498
func (d *RetryDownloader) GetReleases() ([]*Release, error) {
9599
var (
96100
times = d.RetryTimes
@@ -106,6 +110,7 @@ func (d *RetryDownloader) GetReleases() ([]*Release, error) {
106110
return nil, err
107111
}
108112

113+
// GetLabels returns a repository's labels with retry
109114
func (d *RetryDownloader) GetLabels() ([]*Label, error) {
110115
var (
111116
times = d.RetryTimes
@@ -121,6 +126,7 @@ func (d *RetryDownloader) GetLabels() ([]*Label, error) {
121126
return nil, err
122127
}
123128

129+
// GetIssues returns a repository's issues with retry
124130
func (d *RetryDownloader) GetIssues(page, perPage int) ([]*Issue, bool, error) {
125131
var (
126132
times = d.RetryTimes
@@ -137,6 +143,7 @@ func (d *RetryDownloader) GetIssues(page, perPage int) ([]*Issue, bool, error) {
137143
return nil, false, err
138144
}
139145

146+
// GetComments returns a repository's comments with retry
140147
func (d *RetryDownloader) GetComments(issueNumber int64) ([]*Comment, error) {
141148
var (
142149
times = d.RetryTimes
@@ -152,6 +159,7 @@ func (d *RetryDownloader) GetComments(issueNumber int64) ([]*Comment, error) {
152159
return nil, err
153160
}
154161

162+
// GetPullRequests returns a repository's pull requests with retry
155163
func (d *RetryDownloader) GetPullRequests(page, perPage int) ([]*PullRequest, error) {
156164
var (
157165
times = d.RetryTimes

0 commit comments

Comments
 (0)