[F3] the closed date of an issue may be nil
This commit is contained in:
parent
8aa7de8ba0
commit
93d3eaf0b5
3 changed files with 7 additions and 4 deletions
2
go.mod
2
go.mod
|
@ -118,7 +118,7 @@ require (
|
||||||
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
|
||||||
gopkg.in/ini.v1 v1.67.0
|
gopkg.in/ini.v1 v1.67.0
|
||||||
gopkg.in/yaml.v3 v3.0.1
|
gopkg.in/yaml.v3 v3.0.1
|
||||||
lab.forgefriends.org/friendlyforgeformat/gof3 v1.0.1-0.20230909181317-1e49a01bb3b7
|
lab.forgefriends.org/friendlyforgeformat/gof3 v1.0.1-0.20230910085839-f7303be2bb53
|
||||||
mvdan.cc/xurls/v2 v2.5.0
|
mvdan.cc/xurls/v2 v2.5.0
|
||||||
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
|
strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251
|
||||||
xorm.io/builder v0.3.13
|
xorm.io/builder v0.3.13
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1596,8 +1596,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||||
lab.forgefriends.org/friendlyforgeformat/gof3 v1.0.1-0.20230909181317-1e49a01bb3b7 h1:7/4APz7dLeZ51rBxBQjwCpZBmJeOEhLIQfkuVQilN4g=
|
lab.forgefriends.org/friendlyforgeformat/gof3 v1.0.1-0.20230910085839-f7303be2bb53 h1:nFUsYBuqzmXx7nIxGjcU8J1i++7G2P8Rs1fl2TGPjHI=
|
||||||
lab.forgefriends.org/friendlyforgeformat/gof3 v1.0.1-0.20230909181317-1e49a01bb3b7/go.mod h1:TcKaEsgVihjAjw290iDvvirCT0P+DZNpzc0ZgNgy3E4=
|
lab.forgefriends.org/friendlyforgeformat/gof3 v1.0.1-0.20230910085839-f7303be2bb53/go.mod h1:TcKaEsgVihjAjw290iDvvirCT0P+DZNpzc0ZgNgy3E4=
|
||||||
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||||
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
|
lukechampine.com/uint128 v1.2.0 h1:mBi/5l91vocEN8otkC5bDLhi2KdCticRiwbdB0O+rjI=
|
||||||
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
lukechampine.com/uint128 v1.2.0/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk=
|
||||||
|
|
|
@ -116,12 +116,15 @@ func (o *Issue) FromFormat(issue *format.Issue) {
|
||||||
IsClosed: issue.State == "closed",
|
IsClosed: issue.State == "closed",
|
||||||
CreatedUnix: timeutil.TimeStamp(issue.Created.Unix()),
|
CreatedUnix: timeutil.TimeStamp(issue.Created.Unix()),
|
||||||
UpdatedUnix: timeutil.TimeStamp(issue.Updated.Unix()),
|
UpdatedUnix: timeutil.TimeStamp(issue.Updated.Unix()),
|
||||||
ClosedUnix: timeutil.TimeStamp(issue.Closed.Unix()),
|
|
||||||
IsLocked: issue.IsLocked,
|
IsLocked: issue.IsLocked,
|
||||||
Labels: labels,
|
Labels: labels,
|
||||||
Assignees: assignees,
|
Assignees: assignees,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if issue.Closed != nil {
|
||||||
|
o.ClosedUnix = timeutil.TimeStamp(issue.Closed.Unix())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type IssueProvider struct {
|
type IssueProvider struct {
|
||||||
|
|
Loading…
Reference in a new issue