From dbedde78142299e61dc6df181a689f2f3a5d0c07 Mon Sep 17 00:00:00 2001 From: dsspence Date: Mon, 29 Apr 2024 12:43:14 -0400 Subject: [PATCH] Updates go-github to v54 for projects v2 support (#771) * updates go-github to v54 for projects v2 support * combine go.mod indirect requires --------- Co-authored-by: Duncan Spencer <111698+dsspence@users.noreply.github.com> --- client/client.go | 2 +- go.mod | 4 +++- go.sum | 17 +++++++++-------- server/plugin/api.go | 2 +- server/plugin/cluster.go | 2 +- server/plugin/command.go | 2 +- server/plugin/flows.go | 2 +- server/plugin/graphql/lhs_request.go | 6 +++--- server/plugin/mm_34646_token_refresh.go | 2 +- server/plugin/permalinks.go | 2 +- server/plugin/permalinks_test.go | 2 +- server/plugin/plugin.go | 2 +- server/plugin/subscriptions.go | 2 +- server/plugin/template.go | 2 +- server/plugin/template_test.go | 6 +++--- server/plugin/utils.go | 2 +- server/plugin/utils_test.go | 2 +- server/plugin/webhook.go | 4 ++-- 18 files changed, 33 insertions(+), 30 deletions(-) diff --git a/client/client.go b/client/client.go index 4320c6542..40627ef40 100644 --- a/client/client.go +++ b/client/client.go @@ -7,7 +7,7 @@ import ( "net/url" "strings" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/pkg/errors" "golang.org/x/oauth2" diff --git a/go.mod b/go.mod index 033b72e54..fe9017f7c 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/Masterminds/sprig/v3 v3.2.2 - github.com/google/go-github/v41 v41.0.0 + github.com/google/go-github/v54 v54.0.0 github.com/gorilla/mux v1.8.1 github.com/mattermost/mattermost/server/public v0.0.15 github.com/microcosm-cc/bluemonday v1.0.19 @@ -16,8 +16,10 @@ require ( require ( github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect + github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect + github.com/cloudflare/circl v1.3.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dyatlov/go-opengraph/opengraph v0.0.0-20220524092352-606d7b1e5f8a // indirect github.com/fatih/color v1.16.0 // indirect diff --git a/go.sum b/go.sum index de3a7d1c6..a48b0d2f8 100644 --- a/go.sum +++ b/go.sum @@ -14,6 +14,8 @@ github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030I github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= +github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= @@ -26,7 +28,11 @@ github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBT github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bwesterb/go-ristretto v1.2.0/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I= +github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= +github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -57,7 +63,6 @@ github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= @@ -66,12 +71,11 @@ github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Z github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= -github.com/google/go-github/v41 v41.0.0 h1:HseJrM2JFf2vfiZJ8anY2hqBjdfY1Vlj/K27ueww4gg= -github.com/google/go-github/v41 v41.0.0/go.mod h1:XgmCA5H323A9rtgExdTcnDkcqp6S30AVACCBDOonIxg= +github.com/google/go-github/v54 v54.0.0 h1:OZdXwow4EAD5jEo5qg+dGFH2DpkyZvVsAehjvJuUL/c= +github.com/google/go-github/v54 v54.0.0/go.mod h1:Sw1LXWHhXRZtzJ9LI5fyJg9wbQzYvFhW8W5P2yaAQ7s= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= @@ -256,7 +260,6 @@ golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= @@ -274,7 +277,6 @@ golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -306,6 +308,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -319,7 +322,6 @@ golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= @@ -343,7 +345,6 @@ google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9Ywl google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= diff --git a/server/plugin/api.go b/server/plugin/api.go index 36222f23a..5f69b6b52 100644 --- a/server/plugin/api.go +++ b/server/plugin/api.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/gorilla/mux" "github.com/pkg/errors" "golang.org/x/oauth2" diff --git a/server/plugin/cluster.go b/server/plugin/cluster.go index 58ba4a68f..49751901a 100644 --- a/server/plugin/cluster.go +++ b/server/plugin/cluster.go @@ -3,7 +3,7 @@ package plugin import ( "encoding/json" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/mattermost/mattermost/server/public/model" ) diff --git a/server/plugin/command.go b/server/plugin/command.go index 7fb317c0a..a14970c5c 100644 --- a/server/plugin/command.go +++ b/server/plugin/command.go @@ -6,7 +6,7 @@ import ( "strings" "unicode" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/pkg/errors" "github.com/mattermost/mattermost/server/public/model" diff --git a/server/plugin/flows.go b/server/plugin/flows.go index df44d83b5..419d3ac2b 100644 --- a/server/plugin/flows.go +++ b/server/plugin/flows.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/gorilla/mux" "github.com/pkg/errors" diff --git a/server/plugin/graphql/lhs_request.go b/server/plugin/graphql/lhs_request.go index 286098609..46161e1fc 100644 --- a/server/plugin/graphql/lhs_request.go +++ b/server/plugin/graphql/lhs_request.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/pkg/errors" "github.com/shurcooL/githubv4" ) @@ -128,8 +128,8 @@ func newGithubIssue(prNumber githubv4.Int, title, login githubv4.String, reposit userLogin := string(login) milestoneTitle := string(milestone) url := htmlURL.String() - createdAtTime := createdAt.Time - updatedAtTime := updatedAt.Time + createdAtTime := github.Timestamp{Time: createdAt.Time} + updatedAtTime := github.Timestamp{Time: updatedAt.Time} return &github.Issue{ Number: &number, diff --git a/server/plugin/mm_34646_token_refresh.go b/server/plugin/mm_34646_token_refresh.go index 28c67994a..9abd56751 100644 --- a/server/plugin/mm_34646_token_refresh.go +++ b/server/plugin/mm_34646_token_refresh.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/pkg/errors" "github.com/mattermost/mattermost/server/public/pluginapi/cluster" diff --git a/server/plugin/permalinks.go b/server/plugin/permalinks.go index ae1914d40..70094eb82 100644 --- a/server/plugin/permalinks.go +++ b/server/plugin/permalinks.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" ) // maxPermalinkReplacements sets the maximum limit to the number of diff --git a/server/plugin/permalinks_test.go b/server/plugin/permalinks_test.go index 9c4e372e9..881cf9fac 100644 --- a/server/plugin/permalinks_test.go +++ b/server/plugin/permalinks_test.go @@ -7,7 +7,7 @@ import ( "net/url" "testing" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" diff --git a/server/plugin/plugin.go b/server/plugin/plugin.go index 4fe2078f4..d360be6e4 100644 --- a/server/plugin/plugin.go +++ b/server/plugin/plugin.go @@ -12,7 +12,7 @@ import ( "strings" "sync" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/gorilla/mux" "github.com/pkg/errors" "golang.org/x/oauth2" diff --git a/server/plugin/subscriptions.go b/server/plugin/subscriptions.go index d37c0e755..ace54f90a 100644 --- a/server/plugin/subscriptions.go +++ b/server/plugin/subscriptions.go @@ -7,7 +7,7 @@ import ( "strconv" "strings" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/pkg/errors" ) diff --git a/server/plugin/template.go b/server/plugin/template.go index 82b47fd15..ace479fa0 100644 --- a/server/plugin/template.go +++ b/server/plugin/template.go @@ -8,7 +8,7 @@ import ( "text/template" "github.com/Masterminds/sprig/v3" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/pkg/errors" ) diff --git a/server/plugin/template_test.go b/server/plugin/template_test.go index 929dd9a6b..f904df4bc 100644 --- a/server/plugin/template_test.go +++ b/server/plugin/template_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/stretchr/testify/require" ) @@ -1453,8 +1453,8 @@ func iToP(i int) *int { return &i } -func tToP(t time.Time) *time.Time { - return &t +func tToP(t time.Time) *github.Timestamp { + return &github.Timestamp{Time: t} } func bToP(b bool) *bool { diff --git a/server/plugin/utils.go b/server/plugin/utils.go index 3faa1097a..08006f24e 100644 --- a/server/plugin/utils.go +++ b/server/plugin/utils.go @@ -15,7 +15,7 @@ import ( "strings" "unicode" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/pkg/errors" ) diff --git a/server/plugin/utils_test.go b/server/plugin/utils_test.go index 7f7160132..7cff2fc69 100644 --- a/server/plugin/utils_test.go +++ b/server/plugin/utils_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/stretchr/testify/assert" "github.com/mattermost/mattermost/server/public/model" diff --git a/server/plugin/webhook.go b/server/plugin/webhook.go index bc2a05d2f..d2f0e7873 100644 --- a/server/plugin/webhook.go +++ b/server/plugin/webhook.go @@ -13,7 +13,7 @@ import ( "sync" "time" - "github.com/google/go-github/v41/github" + "github.com/google/go-github/v54/github" "github.com/microcosm-cc/bluemonday" "github.com/mattermost/mattermost/server/public/model" @@ -551,7 +551,7 @@ func (p *Plugin) postIssueEvent(event *github.IssuesEvent) { action := event.GetAction() // This condition is made to check if the message doesn't get automatically labeled to prevent duplicated issue messages - timeDiff := time.Until(issue.GetCreatedAt()) * -1 + timeDiff := time.Until(issue.GetCreatedAt().Time) * -1 if action == actionLabeled && timeDiff.Seconds() < 4.00 { return }