Update repository widget last commits
This commit is contained in:
parent
c6bfbf4ac1
commit
71ca1753ef
4 changed files with 31 additions and 38 deletions
|
|
@ -15,7 +15,7 @@ type Repository struct {
|
|||
Token OptionalEnvString `yaml:"token"`
|
||||
PullRequestsLimit int `yaml:"pull-requests-limit"`
|
||||
IssuesLimit int `yaml:"issues-limit"`
|
||||
CommitsLimits int `yaml:"commits-limit"`
|
||||
CommitsLimit int `yaml:"commits-limit"`
|
||||
RepositoryDetails feed.RepositoryDetails
|
||||
}
|
||||
|
||||
|
|
@ -30,8 +30,8 @@ func (widget *Repository) Initialize() error {
|
|||
widget.IssuesLimit = 3
|
||||
}
|
||||
|
||||
if widget.CommitsLimits == 0 || widget.CommitsLimits < -1 {
|
||||
widget.CommitsLimits = 3
|
||||
if widget.CommitsLimit == 0 || widget.CommitsLimit < -1 {
|
||||
widget.CommitsLimit = -1
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
@ -43,7 +43,7 @@ func (widget *Repository) Update(ctx context.Context) {
|
|||
string(widget.Token),
|
||||
widget.PullRequestsLimit,
|
||||
widget.IssuesLimit,
|
||||
widget.CommitsLimits,
|
||||
widget.CommitsLimit,
|
||||
)
|
||||
|
||||
if !widget.canContinueUpdateAfterHandlingErr(err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue