Skip to content

Commit dbf5494

Browse files
committed
first commit
0 parents  commit dbf5494

28 files changed

+7026
-0
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist
2+
/tmp

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["oclif", "oclif-typescript", "prettier"]
3+
}

.github/dependabot.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directory: '/'
5+
schedule:
6+
interval: 'weekly'
7+
day: 'saturday'
8+
versioning-strategy: 'increase'
9+
labels:
10+
- 'dependencies'
11+
open-pull-requests-limit: 5
12+
pull-request-branch-name:
13+
separator: '-'
14+
commit-message:
15+
# cause a release for non-dev-deps
16+
prefix: fix(deps)
17+
# no release for dev-deps
18+
prefix-development: chore(dev-deps)
19+
ignore:
20+
- dependency-name: '@salesforce/dev-scripts'
21+
- dependency-name: '*'
22+
update-types: ['version-update:semver-major']
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: failureNotifications
2+
3+
on:
4+
workflow_run:
5+
workflows:
6+
- version, tag and github release
7+
- publish
8+
types:
9+
- completed
10+
11+
jobs:
12+
failure-notify:
13+
runs-on: ubuntu-latest
14+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
15+
steps:
16+
- name: Announce Failure
17+
id: slack
18+
uses: slackapi/[email protected]
19+
env:
20+
# for non-CLI-team-owned plugins, you can send this anywhere you like
21+
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
22+
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
23+
with:
24+
payload: |
25+
{
26+
"text": "${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }}",
27+
"blocks": [
28+
{
29+
"type": "header",
30+
"text": {
31+
"type": "plain_text",
32+
"text": ":bh-alert: ${{ github.event.workflow_run.name }} failed: ${{ github.event.workflow_run.repository.name }} :bh-alert:"
33+
}
34+
},
35+
{
36+
"type": "section",
37+
"text": {
38+
"type": "mrkdwn",
39+
"text": "Repo: ${{ github.event.workflow_run.repository.html_url }}\nWorkflow name: `${{ github.event.workflow_run.name }}`\nJob url: ${{ github.event.workflow_run.html_url }}"
40+
}
41+
}
42+
]
43+
}

.github/workflows/manualRelease.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: manual release
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
13+
- name: Conventional Changelog Action
14+
id: changelog
15+
uses: TriPSs/conventional-changelog-action@d360fad3a42feca6462f72c97c165d60a02d4bf2
16+
# overriding some of the basic behaviors to just get the changelog
17+
with:
18+
git-user-name: svc-cli-bot
19+
git-user-email: [email protected]
20+
github-token: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
21+
output-file: false
22+
# always do the release, even if there are no semantic commits
23+
skip-on-empty: false
24+
tag-prefix: ''
25+
- uses: notiz-dev/github-action-json-property@7a701887f4b568b23eb7b78bb0fc49aaeb1b68d3
26+
id: packageVersion
27+
with:
28+
path: 'package.json'
29+
prop_path: 'version'
30+
- name: Create Github Release
31+
uses: actions/create-release@v1
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.SVC_CLI_BOT_GITHUB_TOKEN }}
34+
with:
35+
tag_name: ${{ steps.packageVersion.outputs.prop }}
36+
release_name: ${{ steps.packageVersion.outputs.prop }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Pull Request Slack 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 on PR open
12+
env:
13+
WEBHOOK_URL : ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }}
14+
PULL_REQUEST_AUTHOR_ICON_URL : ${{ github.event.pull_request.user.avatar_url }}
15+
PULL_REQUEST_AUTHOR_NAME : ${{ github.event.pull_request.user.login }}
16+
PULL_REQUEST_AUTHOR_PROFILE_URL: ${{ github.event.pull_request.user.html_url }}
17+
PULL_REQUEST_BASE_BRANCH_NAME : ${{ github.event.pull_request.base.ref }}
18+
PULL_REQUEST_COMPARE_BRANCH_NAME : ${{ github.event.pull_request.head.ref }}
19+
PULL_REQUEST_NUMBER : ${{ github.event.pull_request.number }}
20+
PULL_REQUEST_REPO: ${{ github.event.pull_request.head.repo.name }}
21+
PULL_REQUEST_TITLE : ${{ github.event.pull_request.title }}
22+
PULL_REQUEST_URL : ${{ github.event.pull_request.html_url }}
23+
uses: salesforcecli/github-workflows/.github/actions/prNotification@main

.github/workflows/onPushToMain.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# test
2+
name: version, tag and github release
3+
4+
on:
5+
push:
6+
branches: [main]
7+
8+
jobs:
9+
release:
10+
uses: oclif/github-workflows/.github/workflows/githubRelease.yml@main
11+
secrets: inherit
12+
13+
# most repos won't use this
14+
# depends on previous job to avoid git collisions, not for any functionality reason
15+
# docs:
16+
# uses: salesforcecli/github-workflows/.github/workflows/publishTypedoc.yml@main
17+
# secrets: inherit
18+
# needs: release

.github/workflows/onRelease.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [released]
6+
# support manual release in case something goes wrong and needs to be repeated or tested
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: tag that needs to publish
11+
type: string
12+
required: true
13+
jobs:
14+
npm:
15+
uses: oclif/github-workflows/.github/workflows/npmPublish.yml@main
16+
with:
17+
tag: latest
18+
githubTag: ${{ github.event.release.tag_name || inputs.tag }}
19+
secrets: inherit

.github/workflows/test.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: tests
2+
on:
3+
push:
4+
branches-ignore: [main]
5+
workflow_dispatch:
6+
7+
jobs:
8+
unit-tests:
9+
uses: oclif/github-workflows/.github/workflows/unitTest.yml@main

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
**/.DS_Store
2+
*-debug.log
3+
*-error.log
4+
/.idea
5+
/.nyc_output
6+
/dist
7+
/lib
8+
/package-lock.json
9+
/tmp
10+
/yarn.lock
11+
node_modules
12+
oclif.lock
13+
oclif.manifest.json

.mocharc.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"require": [
3+
"ts-node/register"
4+
],
5+
"watch-extensions": [
6+
"ts"
7+
],
8+
"recursive": true,
9+
"reporter": "spec",
10+
"timeout": 60000,
11+
"node-option": [
12+
"loader=ts-node/esm",
13+
"experimental-specifier-resolution=node"
14+
]
15+
}

.prettierrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"@oclif/prettier-config"

.vscode/launch.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "attach",
7+
"name": "Attach",
8+
"port": 9229,
9+
"skipFiles": ["<node_internals>/**"]
10+
},
11+
{
12+
"type": "node",
13+
"request": "launch",
14+
"name": "Execute Command",
15+
"skipFiles": ["<node_internals>/**"],
16+
"program": "${workspaceFolder}/bin/dev.js",
17+
"args": ["hello", "world"]
18+
}
19+
]
20+
}

0 commit comments

Comments
 (0)