From db0bb496d22b6cccaf5bed6f7bbf378a085b4220 Mon Sep 17 00:00:00 2001 From: Suzanne Soy Date: Wed, 28 Jul 2021 17:31:10 +0100 Subject: [PATCH] Handle branches and tags --- cover/private/github-service.rkt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cover/private/github-service.rkt b/cover/private/github-service.rkt index 02b9fd9..2b13f9d 100644 --- a/cover/private/github-service.rkt +++ b/cover/private/github-service.rkt @@ -14,7 +14,7 @@ (list (cons 'service "custom") (cons 'token (getenv "CODECOV_TOKEN")) ;; TODO: this won't work for tags - (cons 'branch (substring (getenv "GITHUB_REF") (string-length "refs/heads/"))) + (cons 'branch (string-trim (getenv "GITHUB_REF") #px"refs/(heads|tags)/")) (cons 'job (getenv "GITHUB_JOB")) (cons 'slug (getenv "GITHUB_REPOSITORY")) (cons 'build (getenv "GITHUB_RUN_ID"))