• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bradleyfalzon / gopherci
60%
master: 61%

Build:
Build:
LAST BUILD BRANCH: review-no-approve
DEFAULT BRANCH: master
Repo Added 22 Oct 2016 12:03PM UTC
Files 0
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH first-commit
branch: first-commit
CHANGE BRANCH
x
Reset
  • first-commit
  • analyser-composition
  • build-summary
  • builddb
  • clone-path
  • commit-comment
  • debug
  • disable-private
  • docker
  • docs-errors
  • dominikh
  • dual-comments
  • error-handling
  • failed-diff
  • fix-goveralls
  • fix-hardcoded
  • gcppubsub
  • godep
  • gopherci-env
  • gopherci.yml
  • graceful
  • ignore-gen
  • integration-test
  • logger
  • master
  • maxcommments
  • memlimit
  • msgs
  • pr-reviews
  • pr-reviews-default
  • preflight
  • pubsub-breaking
  • pubsub-timeout
  • push
  • refactor-analyser
  • reference-failures
  • refreader
  • remove-accountid
  • reporter
  • requeue
  • review-no-approve
  • senderid
  • show-env
  • syncronize
  • test
  • various
  • wbsecret
  • webui

pending completion
280

push

travis-ci

bradleyfalzon
Don't fetch a diff on first commit

Currently, the first commit has the latest commit with a relative
reference of number of commits being pushed. For example, if the
first event has just 1 commit at sha abcdef, commitFrom is abcdef~1
and commitTo is abcdef.

We use relative references to ensure we can always fetch the diff
even if the oldest commit has been removed (via push). But the first
commit doesn't appear to have a valid diff from any GitHub APIs so
to indicate this, we'll set commitFrom to blank.

When it comes to fetching the diff via the VCSReader interface, if
commitFrom is blank, return a nil io.ReadCloser and nil error.

The frontends already know how to handle lack of a diff, it just
occurs even when there's no error now.

This also relates to #79, which was handling fetching diffs when
the before ref no longer exists, which is the case when a branch
tracks a new tree or a new repository is created. I couldn't
combine the logic much further, because GitHub has no indication
when the commit follows a new tree (the before ref is from the
previous tree, whereas in a new repository it's all 0s).

So I wasn't able to combine any logic between this and #79, but
the integration test was renamed from new-go-repository to new-tree
to better reflect what it was doing.

Fixes #96.
Relates to #79.

914 of 1530 relevant lines covered (59.74%)

2.41 hits per line

Relevant lines Covered
Build:
Build:
1530 RELEVANT LINES 914 COVERED LINES
2.41 HITS PER LINE
Source Files on first-commit
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
280 first-commit Don't fetch a diff on first commit Currently, the first commit has the latest commit with a relative reference of number of commits being pushed. For example, if the first event has just 1 commit at sha abcdef, commitFrom is abcdef~1 and commitTo... push 30 May 2017 11:49AM UTC bradleyfalzon travis-ci pending completion  
279 first-commit Don't fetch a diff on first commit Currently, the first commit has the latest commit with a relative reference of number of commits being pushed. For example, if the first event has just 1 commit at sha abcdef, commitFrom is abcdef~1 and commitTo... push 30 May 2017 11:05AM UTC bradleyfalzon travis-ci pending completion  
278 first-commit Don't fetch a diff on first commit Currently, the first commit has the latest commit with a relative reference of number of commits being pushed. For example, if the first event has just 1 commit at sha abcdef, commitFrom is abcdef~1 and commitTo... push 30 May 2017 10:55AM UTC bradleyfalzon travis-ci pending completion  
See All Builds (294)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc