1. Resources
  2. /
  3. Plugins
  4. /
  5. omni-comment-buildkite-plugin

Omni Comment Buildkite Plugin

Combine outputs from many jobs into a single comment on pull requests.

Usage

Create a file named omni-comment.yml to define the section IDs that can appear in the comment:

sections:
  - test_results
  - deploy_preview
  - perf_stats

Add the plugin to your Buildkite pipeline:

steps:
  - label: 'Test'
    command: 'npm test'
    plugins:
      - mskelton/omni-comment#v1:
          section: test_results
          message: 'All tests passed! ✅'
          token: '${GITHUB_TOKEN}'

Comment from a file

To comment from a file on disk, you can use the file-path option instead of message:

steps:
  - label: 'Test'
    command: 'npm test > test-results.txt'
    plugins:
      - mskelton/omni-comment#v1:
          section: test_results
          file-path: test-results.txt
          token: '${GITHUB_TOKEN}'

Configuration Options

OptionDescriptionRequiredDefault
sectionThe section ID that matches with the value in omni-comment.yml
tokenGitHub auth token for commenting on pull requests
messageComment body content
file-pathFile path containing the comment body
titleA title for the section (creates expandable/collapsible section)
collapsedCollapse the section by default (only used if title is set)false
repoThe repository where to create the comment$BUILDKITE_REPO
pr-numberThe pull request number where to create the comment$BUILDKITE_PULL_REQUEST
configPath to the config fileomni-comment.yml

How does it work?

I built this action to solve a problem we have at Ramp of lots of CI outputs that each need to post back to the PR via comments. The problem is, the more comments you have, the more noisy it gets.

The idea was, what if you had a single comment that contained everything? Test results, deploy preview URLs, warnings, etc. When you try to build that though, there are some challenges.

First, it should support workflows running in parallel, so the order in which the comments are posted is non deterministic. However, we want the order of sections in the comment to be consistent between runs. Additionally, we need to support updating the comment if you push a new commit, and the test results are now passing instead of failed.

The GitHub issue comments API only supports sending a complete comment body when making updates, so if we just get the current value and send it back with our updates, its possible that two separate jobs update the comment at the same time and one of the updates will be lost. To workaround this, we need a way for jobs to acquire a “lock” on the comment, so that they can safely get the current comment value, make edits, and push the updated value back to GitHub.

What better locking mechanism than reactions! Turns out, the create reaction API will return a 201 Created status when a reaction is newly created and a 200 OK when the reaction already exists. Using this subtle API detail, this action will attempt to acquire a lock by creating the reaction and waiting for a 201 Created status code. If it receives a 200 OK status code, it will sleep and retry until it is able to acquire a lock (it will fail after 30 seconds if it fails to acquire a lock). Once the lock is acquired, the existing comment will be downloaded, edited, and pushed back to GitHub. After updating the comment, the lock is released by deleting the reaction.

Simple right? 😉

The plugins listed on this webpage are provided for informational purposes only. They have not undergone any formal security review or assessment. While we strive to provide useful resources, we cannot guarantee the safety, reliability, or integrity of these plugins. Users are strongly advised to conduct their own security evaluations before downloading, installing, or using any plugin. By using these plugins, you acknowledge and accept any risks associated with their use. We disclaim any liability for any harm or damages arising from the use of the plugins listed.

Start turning complexity into an advantage

Create an account to get started with a 30-day free trial. No credit card required.

Buildkite Pipelines

Platform

  1. Pipelines
  2. Public pipelines
  3. Test Engine
  4. Package Registries
  5. Mobile Delivery Cloud
  6. Pricing

Hosting options

  1. Self-hosted agents
  2. Mac hosted agents
  3. Linux hosted agents

Resources

  1. Docs
  2. Blog
  3. Changelog
  4. Example pipelines
  5. Plugins
  6. Webinars
  7. Case studies
  8. Events
  9. Migration Services
  10. Comparisons

Company

  1. About
  2. Careers
  3. Press
  4. Security
  5. Brand assets
  6. Contact

Solutions

  1. Replace Jenkins
  2. Workflows for AI/ML
  3. Testing at scale
  4. Monorepo mojo
  5. Bazel orchestration

Legal

  1. Terms of Service
  2. Acceptable Use Policy
  3. Privacy Policy
  4. Subprocessors
  5. Service Level Agreement

Support

  1. System status
  2. Forum
© Buildkite Pty Ltd 2025