Skip to content

Commit 9f27d5f

Browse files
authored
Merge pull request #2 from salesforcecli/ken/github-actions
feat: Add Github Actions and Update Dependency Versions
2 parents 78000fb + 7aa3f39 commit 9f27d5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4473
-2416
lines changed

.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,21 @@
66
*/
77
module.exports = {
88
extends: ['eslint-config-salesforce-typescript', 'eslint-config-salesforce-license'],
9+
rules: {
10+
'@typescript-eslint/member-ordering': 'warn',
11+
'@typescript-eslint/no-unsafe-assignment': 'warn',
12+
'@typescript-eslint/restrict-template-expressions': 'warn',
13+
'@typescript-eslint/no-misused-promises': 'warn',
14+
'@typescript-eslint/no-unsafe-call': 'warn',
15+
'@typescript-eslint/no-unsafe-member-access': 'warn',
16+
'@typescript-eslint/ban-ts-comment': 'warn',
17+
'@typescript-eslint/prefer-nullish-coalescing': 'warn',
18+
'@typescript-eslint/ban-types': 'warn',
19+
'class-methods-use-this': 'warn',
20+
'no-prototype-builtins': 'warn',
21+
'no-case-declarations': 'warn',
22+
radix: 'warn',
23+
'@typescript-eslint/switch-exhaustiveness-check': 'warn',
24+
'@typescript-eslint/no-unsafe-argument': 'warn',
25+
},
926
};

.github/CODEOWNERS

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. Unless a later match takes precedence,
3+
# @forcedotcom/pdt will be requested for
4+
# review when someone opens a pull request.
5+
* @salesforcecli/cli
6+
#ECCN:Open Source
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
---
5+
6+
<!--
7+
NOTICE: While GitHub is the preferred channel for reporting issues/feedback, this is not a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, please use official support channels.
8+
-->
9+
10+
<!--
11+
FOR BUGS RELATED TO THE SALEFORCE CLI, please use this repository: https://github.com/forcedotcom/cli-packages
12+
-->
13+
14+
### Summary
15+
16+
_Short summary of what is going on or to provide context_.
17+
18+
### Steps To Reproduce:
19+
20+
1. This is step 1.
21+
1. This is step 2. All steps should start with '1.'
22+
23+
### Expected result
24+
25+
_Describe what should have happened_.
26+
27+
### Actual result
28+
29+
_Describe what actually happened instead_.
30+
31+
### Additional information
32+
33+
_Feel free to attach a screenshot_.
34+
35+
**VS Code Version**:
36+
37+
**SFDX CLI Version**:
38+
39+
**OS and version**:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
---
5+
6+
**Is your feature request related to a problem? Please describe.**
7+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
8+
9+
**Describe the solution you'd like**
10+
A clear and concise description of what you want to happen.
11+
12+
**Describe alternatives you've considered**
13+
A clear and concise description of any alternative solutions or features you've considered.
14+
15+
**Additional context**
16+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### What does this PR do?
2+
3+
### What issues does this PR fix or reference?

.github/dependabot.yml

Lines changed: 22 additions & 0 deletions
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']

.github/workflows/automerge.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: automerge
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '42 2,5,8,11 * * *'
6+
7+
jobs:
8+
automerge:
9+
uses: salesforcecli/github-workflows/.github/workflows/automerge.yml@main
10+
secrets: inherit

.github/workflows/devScripts.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: devScripts
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '50 6 * * 0'
6+
7+
jobs:
8+
update:
9+
uses: salesforcecli/github-workflows/.github/workflows/devScriptsUpdate.yml@main
10+
secrets: inherit
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 can be visually tested here: https://app.slack.com/block-kit-builder/T01GST6QY0G#%7B%22blocks%22:%5B%5D%7D
25+
# Only copy over the "blocks" array to the Block Kit Builder
26+
payload: |
27+
{
28+
"text": "Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }}",
29+
"blocks": [
30+
{
31+
"type": "header",
32+
"text": {
33+
"type": "plain_text",
34+
"text": ":bh-alert: Workflow \"${{ github.event.workflow_run.name }}\" failed in ${{ github.event.workflow_run.repository.name }} :bh-alert:"
35+
}
36+
},
37+
{
38+
"type": "section",
39+
"text": {
40+
"type": "mrkdwn",
41+
"text": "*Repo:* ${{ github.event.workflow_run.repository.html_url }}\n*Workflow name:* `${{ github.event.workflow_run.name }}`\n*Job url:* ${{ github.event.workflow_run.html_url }}"
42+
}
43+
}
44+
]
45+
}
Lines changed: 36 additions & 0 deletions
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@v3
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@2192e246737701f108a4571462b76c75e7376216
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 }}

0 commit comments

Comments
 (0)