Skip to content

Commit b17975e

Browse files
committed
Add from and to flags
1 parent d72f47b commit b17975e

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.DS_Store
2-
node_modules/
2+
node_modules/
3+
lib/

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ Notify Salesforce Deployment to different Channels
33

44
## Installation
55
sfdx plugins:install sfdx-notify
6-

messages/teams.json

+2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@
22
"commandDescription": "Notify Salesforce Deployment to Microsoft Teams",
33
"urlFlagDescription": "target URL (for Microsoft Teams: Webhook URL)",
44
"envFlagDescription": "Name of the target environment",
5+
"fromFlagDescription": "From tag, to generate the list of commit",
6+
"toFlagDescription": "To tag, to generate the list of commit",
57
"branchFlagDescription": "Current Branch name, for Bitbucket use the environment variable $BITBUCKET_BRANCH"
68
}

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sfdx-notify",
3-
"version": "0.0.0",
3+
"version": "0.0.1",
44
"author": "Gil Avignon",
55
"bugs": "https://github.com/gavignon/sfdx-notify/issues",
66
"dependencies": {

src/commands/notify/teams.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class Teams extends SfdxCommand {
2727
public static description = messages.getMessage('commandDescription');
2828

2929
public static examples = [
30-
`$ sfdx notify:teams -u https://outlook.office.com/webhook/WEBHOOK_URL -e UAT -b $BITBUCKET_BRANCH
30+
`$ sfdx notify:teams --from 5.0 --to HEAD -u https://outlook.office.com/webhook/WEBHOOK_URL -e UAT -b $BITBUCKET_BRANCH
3131
Notify deployment status on Microsoft Teams... Done!
3232
`
3333
];
@@ -37,7 +37,9 @@ export default class Teams extends SfdxCommand {
3737
protected static flagsConfig = {
3838
url: flags.string({char: 'u', description: messages.getMessage('urlFlagDescription')}),
3939
env: flags.string({char: 'e', description: messages.getMessage('envFlagDescription')}),
40-
branch: flags.string({char: 'b', description: messages.getMessage('branchFlagDescription')})
40+
branch: flags.string({char: 'b', description: messages.getMessage('branchFlagDescription')}),
41+
from: flags.string({char: 'f', description: messages.getMessage('fromFlagDescription')}),
42+
to: flags.string({char: 't', description: messages.getMessage('toFlagDescription')})
4143
};
4244

4345
// Comment this out if your command does not require an org username
@@ -52,7 +54,7 @@ export default class Teams extends SfdxCommand {
5254
public async run(): Promise<AnyJson> {
5355
const { stdout: log } = childProcess.spawnSync(
5456
'git',
55-
['log', '5.0..HEAD', '--oneline'],
57+
['log', this.flags.from + '..' + this.flags.to, '--oneline'],
5658
{ cwd: '/Users/gavignon/dev/CMA CGM/Git', encoding: 'utf8' }
5759
);
5860

0 commit comments

Comments
 (0)