Skip to content

Commit

Permalink
update branch names for reporting checks
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed Nov 16, 2022
1 parent f707d71 commit fd15def
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ commands:
when: on_fail
command: git fetch --unshallow
- discord/status:
only_for_branches: main,next,alpha
only_for_branches: main,next,next-release,latest-release
fail_only: true
failure_message: $(yarn get-report-message << pipeline.parameters.workflow >> << parameters.template >>)
jobs:
Expand Down
5 changes: 3 additions & 2 deletions scripts/get-report-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ import { command } from 'execa';
import { readJson } from 'fs-extra';
import { join } from 'path';

type Branch = 'main' | 'next' | 'alpha';
type Branch = 'main' | 'next' | 'alpha' | 'next-release' | 'latest-release';
type Workflow = 'merged' | 'daily';

const getFooter = async (branch: Branch, workflow: Workflow, job: string) => {
if (job === 'chromatic-sandboxes') {
return `\n\nThis might not necessarily be a bug, it could be a visual diff that you have to review and approve. Please check it!`;
}

if (branch === 'alpha') {
// The CI workflows can run on release branches and we should display the version number
if (branch === 'next-release' || branch === 'latest-release') {
const packageJson = await readJson(join(__dirname, '..', 'code', 'package.json'));

// running in alpha branch we should just show the version which failed
Expand Down

0 comments on commit fd15def

Please sign in to comment.