Skip to content

Coveralls plugin incorrectly reports branch name as git commit hash #121

@siovene

Description

@siovene

Expected vs Actual Behaviour

It should correctly report the branch name to Coveralls.

Instead it uses the hash of the current git commit.

Steps to Reproduce

With the following settings in build.sbt:

jacocoCoverallsJobId := {
  if (System.getenv("CI_BUILD_NUMBER") != null)
    System.getenv("CI_BUILD_NUMBER")
  else
    "Unknown build number"
}
jacocoCoverallsBuildNumber := Option(System.getenv("CI_BUILD_NUMBER"))
jacocoCoverallsPullRequest := Option(System.getenv("CI_PR_NUMBER"))
jacocoCoverallsRepoToken := Option(System.getenv("COVERALLS_REPO_TOKEN"))

the coveralls page reports the branch name as the current git commit, instead of the actual branch name. This makes it impossible to merge reports from multiple CI pipelines (e.g. our second pipeline is node/javascript using coveralls.js, which uses the correct branch name).

Environment

  • SBT version: 1.2.7
  • Plugin version: 3.1.0
  • Scala version(s): 2.12.1
  • Java version: 8

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions