diff --git a/api/fetch_ignores.go b/api/fetch_ignores.go index 788bbf37e..35a1cf360 100644 --- a/api/fetch_ignores.go +++ b/api/fetch_ignores.go @@ -2,6 +2,7 @@ package api import ( "encoding/json" + "os" ignoretypes "github.com/bearer/bearer/internal/util/ignore/types" ) @@ -14,18 +15,21 @@ type CloudIgnoreData struct { } type CloudIgnorePayload struct { - Project string `json:"project"` - LocalIgnores []string `json:"local_ignores"` + Project string `json:"project"` + LocalIgnores []string `json:"local_ignores"` + PullRequestNumber string `json:"pull_request_number,omitempty"` } func (api *API) FetchIgnores(fullname string, localIgnores []string) (*CloudIgnoreData, error) { endpoint := Endpoints.FetchIgnores + bytes, err := api.makeRequest(endpoint.Route, endpoint.HttpMethod, Message{ Type: MessageTypeSuccess, Data: CloudIgnorePayload{ - Project: fullname, - LocalIgnores: localIgnores, + Project: fullname, + LocalIgnores: localIgnores, + PullRequestNumber: os.Getenv("PR_NUMBER"), }, }) if err != nil {