Skip to content

Commit c6acfb1

Browse files
committed
Merge branch 'main' into mwbrooks-lint-st1023
2 parents 6811517 + 918900f commit c6acfb1

File tree

272 files changed

+3855
-3273
lines changed

Some content is hidden

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

272 files changed

+3855
-3273
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
default: "dev-build"
110110
docker: # run the steps with Docker
111111
# CircleCI Go images available at: https://hub.docker.com/r/circleci/golang/
112-
- image: cimg/go:1.24.2
112+
- image: cimg/go:1.24.3
113113
steps: # steps that comprise the `build` job
114114
- checkout # check out source code to working directory
115115
- restore_cache: # restores saved cache if no changes are detected since last run

.github/MAINTAINERS_GUIDE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,18 @@ Testing in our CI setup uses changes to these files when creating test builds.
578578
Many good things come to an end. This can sometimes include commands and flags.
579579
When commands or flags need to be removed, follow these steps:
580580

581+
<details>
582+
<summary>Deprecating features</summary>
583+
584+
- Public functionality should be deprecated on the next `semver:major` version
585+
- Add the comment `// DEPRECATED(semver:major): Description about the deprecation and migration path`
586+
- Print a warning `PrintWarning("DEPRECATED: Description about the deprecation and migration path")`
587+
- Internal functionality can be deprecated anytime
588+
- Add the comment `// DEPRECATED: Description about the deprecation and migration path`
589+
- Please add deprecation comments generously to help the next person completely remove the feature and tests
590+
591+
</details>
592+
581593
<details>
582594
<summary>Deprecating commands</summary>
583595

.github/workflows/delete-pr-build-on-close.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ name: Delete pre-release when a branch is deleted
1313
# See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-pull_request-workflow-when-a-pull-request-merges
1414
# See https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target
1515
on:
16-
pull_request_target:
16+
pull_request_target: # zizmor: ignore[dangerous-triggers]
1717
types:
1818
- closed
1919

.github/workflows/dependencies.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ jobs:
1212
steps:
1313
- name: Gather credentials
1414
id: credentials
15-
uses: actions/[email protected].2
15+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
1616
with:
1717
app-id: ${{ secrets.GH_APP_ID_RELEASER }}
1818
private-key: ${{ secrets.GH_APP_PRIVATE_KEY_RELEASER }}
1919
- name: Checkout the repo
20-
uses: actions/[email protected]
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
with:
22+
persist-credentials: true
2223
ref: main
2324
token: ${{ steps.credentials.outputs.token }}
2425
- name: Install Golang
25-
uses: actions/setup-go@v5.4.0
26+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
2627
with:
2728
go-version: "stable"
2829
- name: Get the latest version

.github/workflows/e2e_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ jobs:
2222
steps:
2323
- name: Trigger CircleCI 'local' workflow
2424
if: ${{ github.event.inputs.status == 'false' }}
25-
uses: promiseofcake/[email protected]
25+
uses: promiseofcake/circleci-trigger-action@31bce5a96436643ef4aa09acc954916d7316bb1b # v1.7.8
2626
with:
2727
user-token: ${{ secrets.CIRCLECI_TOKEN }}
2828
project-slug: slackapi/slack-cli
2929
branch: ${{ github.event.inputs.branch }}
3030
payload: '{"run_local_build_test_workflow": true}'
3131
- name: Trigger CircleCI 'e2e' workflow
3232
if: ${{ github.event.inputs.status == 'true' }}
33-
uses: promiseofcake/[email protected]
33+
uses: promiseofcake/circleci-trigger-action@31bce5a96436643ef4aa09acc954916d7316bb1b # v1.7.8
3434
with:
3535
user-token: ${{ secrets.CIRCLECI_TOKEN }}
3636
project-slug: slackapi/slack-cli

.github/workflows/license_check.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,10 @@ jobs:
1313
permissions:
1414
contents: read
1515
steps:
16-
- uses: actions/[email protected]
16+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
18-
# Number of commits to fetch. 0 indicates all history for all branches and tags.
19-
# Default: 1
20-
# TODO - We should not fetch all history.
21-
# But we need to fetch the latest tag to run `make test` and `make build`.
22-
# This is a workaround until we fetch the latest tag using the Makefile.
23-
fetch-depth: 0
18+
persist-credentials: false
2419
- name: Check license headers
25-
uses: apache/[email protected]
20+
uses: apache/skywalking-eyes@5c5b974209f0de5d905f37deb69369068ebfc15c # v0.7.0
2621
with:
2722
config: .licenserc.yml

.github/workflows/sync-docs-from-cli-repo.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,19 @@ jobs:
2222
steps:
2323
- name: Generate a GitHub token
2424
id: ghtoken
25-
uses: actions/[email protected].2
25+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
2626
with:
2727
app-id: ${{ secrets.GH_APP_ID_DOCS }}
2828
owner: slackapi
2929
private-key: ${{ secrets.GH_APP_PRIVATE_KEY_DOCS }}
3030

3131
- name: Checkout the tool repo (source)
32-
uses: actions/[email protected]
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
with:
34+
persist-credentials: false
3335

3436
- name: Checkout the docs site repo (destination)
35-
uses: actions/[email protected]
37+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3638
with:
3739
repository: slackapi/slackapi.github.io
3840
path: "docs_repo"
@@ -41,7 +43,9 @@ jobs:
4143

4244
- name: Update docs in docs site repo
4345
run: |
44-
rsync -av --delete ./docs/ ./docs_repo/content/${{ github.event.repository.name }}/
46+
rsync -av --delete ./docs/ "./docs_repo/content/$REPO/"
47+
env:
48+
REPO: ${{ github.event.repository.name }}
4549

4650
- name: Install dependencies
4751
run: |
@@ -56,7 +60,7 @@ jobs:
5660
- name: Create a pull request
5761
if: ${{ github.ref_name == github.event.repository.default_branch || github.event_name == 'workflow_dispatch' }}
5862
id: site-pr
59-
uses: peter-evans/[email protected]
63+
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
6064
with:
6165
token: ${{ steps.ghtoken.outputs.token }}
6266
title: "From ${{ github.event.repository.name }}: ${{ github.event.pull_request.title || 'manual docs sync' }}"
@@ -72,4 +76,6 @@ jobs:
7276
- name: Output the pull request link
7377
if: ${{ steps.site-pr.outputs.pull-request-url }}
7478
run: |
75-
echo "Pull request created: ${{ steps.site-pr.outputs.pull-request-url }}" >> $GITHUB_STEP_SUMMARY
79+
echo "Pull request created: $URL" >> $GITHUB_STEP_SUMMARY
80+
env:
81+
URL: ${{ steps.site-pr.outputs.pull-request-url }}

.github/workflows/tests.yml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,23 @@ jobs:
1818
permissions:
1919
contents: read
2020
steps:
21-
- uses: actions/[email protected]
21+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2222
with:
23-
# Number of commits to fetch. 0 indicates all history for all branches and tags.
24-
# Default: 1
25-
# TODO - We should not fetch all history.
26-
# But we need to fetch the latest tag to run `make test` and `make build`.
27-
# This is a workaround until we fetch the latest tag using the Makefile.
2823
fetch-depth: 0
29-
24+
persist-credentials: false
3025
- name: Set up Go
31-
uses: actions/setup-go@v5.4.0
26+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
3227
with:
33-
go-version: "1.24.2"
28+
go-version: "1.24.3"
3429
- name: Lint
35-
uses: golangci/golangci-lint-action@v7.0.0
30+
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3631
with:
3732
version: latest
3833
args: --timeout=5m
39-
4034
- name: Unit Tests
4135
run: make test
42-
4336
- name: Upload coverage to Codecov
44-
uses: codecov/[email protected].2
37+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
4538
with:
4639
token: ${{ secrets.CODECOV_TOKEN }}
4740
files: ./coverage.out
@@ -55,13 +48,15 @@ jobs:
5548
checks: write
5649
contents: read
5750
steps:
58-
- uses: actions/[email protected]
51+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
with:
53+
persist-credentials: false
5954
- name: Set up Go
60-
uses: actions/setup-go@v5.4.0
55+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
6156
with:
62-
go-version: "1.24.2"
57+
go-version: "1.24.3"
6358
- name: Report health score
64-
uses: slackapi/[email protected]
59+
uses: slackapi/slack-health-score@d58a419f15cdaff97e9aa7f09f95772830ab66f7 # v0.1.1
6560
with:
6661
extension: "go"
6762
codecov_token: ${{ secrets.ELAINES_CODECOV_API_TOKEN }}

.golangci.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,35 @@ linters:
3333
staticcheck:
3434
checks:
3535
- all
36-
- '-ST1003' # disable rule 'Poorly chosen identifier'
37-
- '-ST1005' # disable rule 'Incorrectly formatted error string'
38-
- '-ST1006' # disable rule 'Poorly chosen receiver name'
39-
- '-ST1008' # disable rule 'Function’s error value should be its last return value'
4036
- '-QF1001' # disable rule 'Apply De Morgan’s law'
4137
- '-QF1012' # disable rule 'Use fmt.Fprintf instead of x.Write(fmt.Sprintf(...))'
4238
- '-QF1003' # disable rule 'Convert if/else-if chain to tagged switch'
43-
- '-QF1004' # disable rule 'Use strings.ReplaceAll instead of strings.Replace'
44-
- '-QF1008' # disable rule 'Omit embedded fields from selector'
45-
- '-QF1011' # disable rule 'Omit redundant type from variable declaration'
46-
- '-ST1016' # disable rule 'Use consistent method receiver names'
39+
# https://golangci-lint.run/usage/linters/#staticcheck
40+
# https://staticcheck.dev/docs/configuration/options/#initialisms
41+
initialisms:
42+
- "ACL"
43+
- "API"
44+
- "CLI"
45+
- "EOF"
46+
- "HTML"
47+
- "HTTP"
48+
- "HTTPS"
49+
- "ID"
50+
- "IP"
51+
- "JSON"
52+
- "SDK"
53+
- "TCP"
54+
- "TLS"
55+
- "TS"
56+
- "TTL"
57+
- "UI"
58+
- "URI"
59+
- "URL"
60+
- "UTF"
61+
- "UTF8"
62+
- "UUID"
63+
- "XML"
64+
4765
formatters:
4866
enable:
4967
- gofmt

cmd/app/add.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func preRunAddCommand(ctx context.Context, clients *shared.ClientFactory) error
8989
if err != nil {
9090
return err
9191
}
92-
if manifestSource.Equals(config.MANIFEST_SOURCE_REMOTE) {
92+
if manifestSource.Equals(config.ManifestSourceRemote) {
9393
return slackerror.New(slackerror.ErrAppInstall).
9494
WithMessage("Apps cannot be installed due to project configurations").
9595
WithRemediation(

0 commit comments

Comments
 (0)