Docs/CI

Attachments

Attachments can be used as top level messages or to attach rich multimedia to a change surface.

Example

Attachments make it easy for you to anootate branches with top level messages or media. They use the same API as our Links and Code annotations, except display inline at the top of the diff.

How it works

Import and provide the following properties to the annotation method.

import { annotate } from 'pierre';

export default async () => {
  annotate({
    icon: Icons.CIFailed,
    color: 'red',
    label: 'Typescript failure',
    description: `${errorMessage} (${errorCode})`,
  });
};

It's important that you omit the href and the filename fields from the annotation interface when trying to render an annotation as an "attachment". The presence of these properties will make these attachments render as links or code annotaitons.

export interface Annotation {
  // Themeable color
  color?: Color;

  // visual icon
  icon?: Icons;

  // title for an annotation
  label?: string;

  // description of the annotaiton
  description?: string;
}

Icon and colors come from the Pierre design system. While not open sourced, you can use any color or icon from the system by name.

Joyful code review

Pierre wants you to enjoy code review with your team. So, we built a ~NEW~*~ Git platform to do just that. Get started today for free.

We're in public beta! Join our Discord to share feedback and chat with the Pierre team.