Skip to content

Commit 2c9bc71

Browse files
Merge branch 'main' into sm/ctc
2 parents 2eb31da + d98e6e9 commit 2c9bc71

File tree

5 files changed

+144
-129
lines changed

5 files changed

+144
-129
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Slack pull request open notification
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Notify slack pr open
12+
env:
13+
SLACK_WEBHOOK_URL : ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }}
14+
PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }}
15+
PULL_REQUEST_TITLE : ${{ github.event.pull_request.title }}
16+
PULL_REQUEST_AUTHOR_NAME : ${{ github.event.pull_request.user.login }}
17+
PULL_REQUEST_AUTHOR_ICON_URL : ${{ github.event.pull_request.user.avatar_url }}
18+
PULL_REQUEST_URL : ${{ github.event.pull_request.html_url }}
19+
PULL_REQUEST_BODY : ${{ github.event.pull_request.body }}
20+
PULL_REQUEST_COMPARE_BRANCH_NAME : ${{ github.event.pull_request.head.ref }}
21+
PULL_REQUEST_BASE_BRANCH_NAME : ${{ github.event.pull_request.base.ref }}
22+
IS_SEND_HERE_MENTION : false
23+
uses: jun3453/[email protected]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@oclif/config": "^1",
99
"@salesforce/command": "^3.0.3",
1010
"@salesforce/core": "^2.17.0",
11-
"@salesforce/kit": "^1.4.0",
11+
"@salesforce/kit": "^1.4.5",
1212
"open": "^7.3.1",
1313
"tslib": "^2"
1414
},

src/commands/force/org/display.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
import * as os from 'os';
99
import { flags, FlagsConfig, SfdxCommand } from '@salesforce/command';
1010
import { AuthInfo, Messages, sfdc, SfdxError } from '@salesforce/core';
11+
import { camelCaseToTitleCase } from '@salesforce/kit';
1112

1213
import { OrgDisplayReturn, ScratchOrgFields } from '../../../shared/orgTypes';
13-
import { getAliasByUsername, camelCaseToTitleCase } from '../../../shared/utils';
14+
import { getAliasByUsername } from '../../../shared/utils';
1415
import { getStyledValue } from '../../../shared/orgHighlighter';
1516
import { OrgListUtil } from '../../../shared/orgListUtil';
1617

src/shared/utils.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ export const getAliasByUsername = async (username: string): Promise<string> => {
1414
return keys?.length ? keys[0] : undefined;
1515
};
1616

17-
export const camelCaseToTitleCase = (text: string): string => {
18-
return text
19-
.replace(/(^\w|\s\w)/g, (m) => m.toUpperCase())
20-
.replace(/([A-Z][a-z]+)/g, ' $1')
21-
.trim();
22-
};
23-
2417
export const openUrl = async (url: string): Promise<ChildProcess> => {
2518
return open(url);
2619
};

0 commit comments

Comments
 (0)