Skip to content

Commit

Permalink
Coveralls: assert that github_pr is either a string or an integer, …
Browse files Browse the repository at this point in the history
…and don't rely on integers being "non-empty" (#317)
  • Loading branch information
DilumAluthge authored Jun 10, 2021
1 parent aa01a30 commit b79485e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Coverage"
uuid = "a2441757-f6aa-5fb2-8edb-039e3f45d037"
authors = ["Iain Dunning <[email protected]>", "contributors"]
version = "1.2.1"
version = "1.2.2"

[deps]
CoverageTools = "c36e975a-824b-4404-a568-ef97ca766997"
Expand Down
3 changes: 2 additions & 1 deletion src/coveralls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ module Coveralls
event_path = open(JSON.Parser.parse, ENV["GITHUB_EVENT_PATH"])
github_pr_info = get(event_path, "pull_request", Dict())
github_pr = get(github_pr_info, "number", "")
isempty(github_pr) || (data["service_pull_request"] = strip(string(github_pr)))
github_pr::Union{AbstractString, Integer}
((github_pr isa Integer) || (!isempty(github_pr))) && (data["service_pull_request"] = strip(string(github_pr)))
else
data["git"] = parse_git_info(git_info)
end
Expand Down

2 comments on commit b79485e

@DilumAluthge
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/38613

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.2.2 -m "<description of version>" b79485e2c09c7767af028f65efef58444428c402
git push origin v1.2.2

Please sign in to comment.