From 59542d7a8af5b6943babd2fe2694eecb0992f809 Mon Sep 17 00:00:00 2001 From: Christophe Hurpeau Date: Sun, 22 Jan 2023 14:48:03 +0100 Subject: [PATCH] feat: use of github palette in all configs --- src/accountConfigs/christophehurpeau.ts | 12 +------ .../color-palettes/githubPalette.ts | 10 ++++++ src/accountConfigs/defaultConfig.ts | 20 ++++++++--- src/accountConfigs/ornikar.ts | 35 ++++++++++--------- 4 files changed, 44 insertions(+), 33 deletions(-) create mode 100644 src/accountConfigs/color-palettes/githubPalette.ts diff --git a/src/accountConfigs/christophehurpeau.ts b/src/accountConfigs/christophehurpeau.ts index d342abdfd..de3bccd53 100644 --- a/src/accountConfigs/christophehurpeau.ts +++ b/src/accountConfigs/christophehurpeau.ts @@ -1,16 +1,6 @@ +import { githubPalette } from './color-palettes/githubPalette'; import type { Config } from './types'; -const githubPalette = { - accentEmphasis: '#1f6feb', - successEmphasis: '#238636', - attentionEmphasis: '#9e6a03', - severeEmphasis: '#bd561d', - dangerEmphasis: '#da3633', - doneEmphasis: '#8957e5', - scaleBlue1: '#a5d6ff', - scaleGray6: '#57606a', -}; - const config: Config<'dev', never> = { autoAssignToCreator: true, trimTitle: true, diff --git a/src/accountConfigs/color-palettes/githubPalette.ts b/src/accountConfigs/color-palettes/githubPalette.ts new file mode 100644 index 000000000..2ec663dd4 --- /dev/null +++ b/src/accountConfigs/color-palettes/githubPalette.ts @@ -0,0 +1,10 @@ +export const githubPalette = { + accentEmphasis: '#1f6feb', + successEmphasis: '#238636', + attentionEmphasis: '#9e6a03', + severeEmphasis: '#bd561d', + dangerEmphasis: '#da3633', + doneEmphasis: '#8957e5', + scaleBlue1: '#a5d6ff', + scaleGray6: '#57606a', +}; diff --git a/src/accountConfigs/defaultConfig.ts b/src/accountConfigs/defaultConfig.ts index d79b33d61..6de9bb199 100644 --- a/src/accountConfigs/defaultConfig.ts +++ b/src/accountConfigs/defaultConfig.ts @@ -1,3 +1,4 @@ +import { githubPalette } from './color-palettes/githubPalette'; import type { Config } from './types'; const config: Config = { @@ -17,15 +18,24 @@ const config: Config = { teams: {}, labels: { list: { - // /* ci */ - // 'ci/in-progress': { name: ':green_heart: ci/in-progress', color: '#0052cc' }, - // 'ci/fail': { name: ':green_heart: ci/fail', color: '#e11d21' }, - // 'ci/passed': { name: ':green_heart: ci/passed', color: '#86f9b4' }, + /* checks */ + 'checks/in-progress': { + name: ':green_heart: checks/in-progress', + color: githubPalette.scaleGray6, + }, + 'checks/failed': { + name: ':green_heart: checks/fail', + color: githubPalette.dangerEmphasis, + }, + 'checks/passed': { + name: ':green_heart: checks/passed', + color: githubPalette.successEmphasis, + }, /* infos */ 'breaking-changes': { name: ':warning: Breaking Changes', - color: '#ef7934', + color: githubPalette.attentionEmphasis, }, }, diff --git a/src/accountConfigs/ornikar.ts b/src/accountConfigs/ornikar.ts index 3cc216359..177c84961 100644 --- a/src/accountConfigs/ornikar.ts +++ b/src/accountConfigs/ornikar.ts @@ -1,3 +1,4 @@ +import { githubPalette } from './color-palettes/githubPalette'; import type { Config } from './types'; const lateOceanColorPalette = { @@ -287,15 +288,15 @@ const config: Config<'dev' | 'design', 'ops' | 'frontends' | 'backends'> = { /* checks */ 'checks/in-progress': { name: ':green_heart: checks/in-progress', - color: lateOceanColorPalette.warmEmbrace, + color: githubPalette.scaleGray6, }, 'checks/failed': { name: ':green_heart: checks/fail', - color: lateOceanColorPalette.englishVermillon, + color: githubPalette.dangerEmphasis, }, 'checks/passed': { name: ':green_heart: checks/passed', - color: lateOceanColorPalette.viride, + color: githubPalette.successEmphasis, }, // /* ci */ @@ -306,37 +307,37 @@ const config: Config<'dev' | 'design', 'ops' | 'frontends' | 'backends'> = { /* code */ 'code/needs-review': { name: ':ok_hand: code/needs-review', - color: lateOceanColorPalette.goldCrayola, + color: githubPalette.attentionEmphasis, }, 'code/review-requested': { name: ':ok_hand: code/review-requested', - color: lateOceanColorPalette.warmEmbrace, + color: githubPalette.scaleGray6, }, 'code/changes-requested': { name: ':ok_hand: code/changes-requested', - color: lateOceanColorPalette.englishVermillon, + color: githubPalette.dangerEmphasis, }, 'code/approved': { name: ':ok_hand: code/approved', - color: lateOceanColorPalette.viride, + color: githubPalette.successEmphasis, }, /* design */ 'design/needs-review': { name: ':art: design/needs-review', - color: lateOceanColorPalette.goldCrayola, + color: githubPalette.attentionEmphasis, }, 'design/review-requested': { name: ':art: design/review-requested', - color: lateOceanColorPalette.warmEmbrace, + color: githubPalette.scaleGray6, }, 'design/changes-requested': { name: ':art: design/changes-requested', - color: lateOceanColorPalette.englishVermillon, + color: githubPalette.dangerEmphasis, }, 'design/approved': { name: ':art: design/approved', - color: lateOceanColorPalette.viride, + color: githubPalette.successEmphasis, }, /* teams */ @@ -356,32 +357,32 @@ const config: Config<'dev' | 'design', 'ops' | 'frontends' | 'backends'> = { /* auto merge */ 'merge/automerge': { name: ':soon: automerge', - color: lateOceanColorPalette.viride, + color: githubPalette.successEmphasis, }, 'merge/skip-ci': { name: ':vertical_traffic_light: skip-ci', - color: lateOceanColorPalette.seaShell, + color: githubPalette.scaleBlue1, }, 'merge/update-branch': { name: ':arrows_counterclockwise: update branch', - color: lateOceanColorPalette.seaShell, + color: githubPalette.accentEmphasis, }, 'merge/bypass-progress': { name: ':soon: bypass progress', - color: lateOceanColorPalette.englishVermillon, + color: githubPalette.dangerEmphasis, }, /* feature-branch */ 'feature-branch': { name: 'feature-branch', - color: lateOceanColorPalette.aero, + color: githubPalette.accentEmphasis, }, /* infos */ 'breaking-changes': { name: ':warning: Breaking Changes', description: 'This issue or pull request will need a new major version', - color: lateOceanColorPalette.lateOcean, + color: githubPalette.attentionEmphasis, }, duplicate: { name: 'duplicate',