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

bradleyfalzon / gopherci / 325
60%
master: 61%

Build:
Build:
LAST BUILD BRANCH: review-no-approve
DEFAULT BRANCH: master
Ran 11 Aug 2017 07:32AM UTC
Jobs 1
Files 20
Run time 2s
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

pending completion
325

push

travis-ci

bradleyfalzon
Comment on commits via CommitCommentReporter and InlineCommitCommentReporter

Previously we were only comments on Pull Requests, this adds support for
commenting on commits (eg during a Push Event).

Unlike Pull Requests, where inline comments are positioned in relation to
the entire pull request (no matter how many commits there are), commit
comments must be on the individual commit and positioned relative to that
commit.

GopherCI runs across all commits, and the diffs it generates are the
accumulation of all commits. See full discussion in #75 for why other
workarounds wouldn't work.

Instead, if the push event only has one commit, we can place comments
inline and we use InlineCommitCommentReporter for this.

If there's multiple commits, we'll use CommitCommentReporter to create
a single comment on the most recent commit with a summary saying

    GopherCI found %d issues in the last %d commits, see: https://...

The user can then visit the URL to see all issues and they also appear
inline on the analysis summary page.

When commit comments are combined with pull requests, the following
behaviour occurs (tested at the time of writing):

If a single comment was created with CommitCommentReporter, the pull
request will show this single comment on the main pull request page,
then the pull request event will create inline comments for the same
issues. So you'll see n+1 comments, in different locations on the
GitHub UI.

If multiple inline comments were created with InlineCommitCommentReporter
all inline comments are shown on the main pull request page (they don't
appear inline on the pull request), and then the pull request event
will create additional inline comments for the same issues. So you'll
see n*2 comments, in different locations on the GitHub UI.

If this behaviour is not desired, there may be some options:

- Disable push event event analysis.
- Disable pull request event analysis.
- Pull request to delete existing commit comments.
- Pull request to check for existing commit comment and skip.
- There may be other options too.

I'm wary about deleting commit comments, there may have been some
discussion there.

1039 of 1752 relevant lines covered (59.3%)

2.56 hits per line

Jobs
ID Job ID Ran Files Coverage
1 325.1 (GOOGLE_APPLICATION_CREDENTIALS=/tmp/gcloud-GopherCI-dev.json) 11 Aug 2017 07:32AM UTC 0
59.3
Travis Job 325.1
Source Files on build 325
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #325
  • 3ea006b2 on github
  • Prev Build on commit-comment (#324)
  • Next Build on commit-comment (#326)
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

© 2026 Coveralls, Inc