Skip to content

Commit

Permalink
feat(notify): message improve
Browse files Browse the repository at this point in the history
  • Loading branch information
Airkro committed Apr 7, 2024
1 parent d7331d4 commit ffed3af
Show file tree
Hide file tree
Showing 5 changed files with 111 additions and 203 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"packages/*"
],
"devDependencies": {
"@nice-move/cli": "^0.11.3",
"@nice-move/eslint-config-base": "^0.11.1",
"@nice-move/prettier-config": "^0.10.0",
"best-shot": "^0.5.1",
"@nice-move/cli": "0.11.3",
"@nice-move/eslint-config-base": "^0.11.3",
"@nice-move/prettier-config": "^0.11.1",
"best-shot": "^0.5.2",
"eslint": "^8.57.0",
"garou": "^0.7.0",
"garou": "^0.7.2",
"prettier": "^3.2.5"
},
"peerDependencies": {
Expand Down
22 changes: 5 additions & 17 deletions packages/notify/lib/utils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const {
GIT_HTTP_URL,
JOB_ID,
npm_package_version = '未知',
PROJECT_NAME,
PROJECT_WEB_URL,
} = process.env;

Expand Down Expand Up @@ -269,7 +268,11 @@ export function createContent({
children: [
{
type: 'text',
value: CCI_JOB_NAME || '自动化任务',
value: '任务 ',
},
{
type: 'text',
value: CCI_JOB_NAME,
},
{
type: 'text',
Expand All @@ -290,21 +293,6 @@ export function createContent({
{
type: 'paragraph',
children: [
PROJECT_NAME
? {
type: 'link',
url: PROJECT_WEB_URL,
children: [
{
type: 'text',
value: PROJECT_NAME,
},
],
}
: {
type: 'text',
value: project,
},
{
type: 'text',
value: ' 发布了新的版本',
Expand Down
4 changes: 2 additions & 2 deletions packages/notify/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bring-it/notify",
"version": "0.3.1",
"version": "0.3.2",
"description": "Send releases notifications",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -45,7 +45,7 @@
"gitlog": "^4.0.8",
"lodash": "^4.17.21",
"mdast-util-to-markdown": "^2.1.0",
"semver": "^7.5.4"
"semver": "^7.6.0"
},
"peerDependencies": {
"@bring-it/cli": "workspace:^"
Expand Down
14 changes: 8 additions & 6 deletions packages/npm/src/lib/check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ export async function check({ force }) {
return false;
}

if (!force && !(await branchCanRelease())) {
return false;
}

if (!force && !(await isGitClean())) {
return false;
if (!force) {
if (!(await branchCanRelease())) {
return false;
}

if (!(await isGitClean())) {
return false;
}
}
} catch (error) {
logger.fail('Checking failed');
Expand Down
Loading

0 comments on commit ffed3af

Please sign in to comment.