Loading files
ca042f11dThis file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/openharness-1322671404.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
ca042f11dThis file is pinned to the selected release. Download the original to open it in your design tool.
import 'package:flutter/painting.dart';
import 'package:xterm/xterm.dart';
/// GitHub's four PR states keep their shape as well as their color. These are
/// the original 16px Primer Octicons, shared with the native title bar.
String pullRequestIconAsset(String state) =>
'assets/octicons/${switch (state) {
'Merged' => 'git-merge',
'Closed' => 'git-pull-request-closed',
'Draft' => 'git-pull-request-draft',
_ => 'git-pull-request',
}}.svg';
Color pullRequestIconColor(
String state,
TerminalTheme theme, {
bool color = true,
}) {
if (!color) return theme.foreground;
final light = theme.background.computeLuminance() > .5;
return switch (state) {
'Open' => Color(light ? 0xff1a7f37 : 0xff3fb950),
'Merged' => Color(light ? 0xff8250df : 0xffbc8cff),
'Closed' => Color(light ? 0xffcf222e : 0xfff85149),
_ => Color(light ? 0xff656d76 : 0xff9198a1),
};
}