Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #560 +/- ##
=======================================
Coverage 95.92% 95.92%
=======================================
Files 14 14
Lines 2697 2697
=======================================
Hits 2587 2587
Misses 110 110 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg
left a comment
There was a problem hiding this comment.
🐙 Leaving notes for the wonderful reviewers after changes have become more stable in recent testing!
| > **Note:** During CLI integration tests, `.github/resources/.slack` is moved to | ||
| > `.slack` at the project root so the Slack CLI can discover the app manifest. |
There was a problem hiding this comment.
🔭 thought: This might be a limitation of the CLI at the moment. I think patterns exist elsewhere toward this, but I'm curious if an option in this action makes more sense...
-C <path>
Run as if git was started in <path> instead of the current working directory.
| include: | | ||
| dist/**/* | ||
| cli/**/* |
There was a problem hiding this comment.
📠 note: An example build shows both directories and adjacent files exist and work as expected!
📦 https://github.com/zimeg/slack-github-action/tree/v2.2.0-rc.1
🪵 https://github.com/zimeg/deno-github-functions/pull/1/checks
| uses: ./cli | ||
| with: | ||
| command: "version" | ||
| version: "3.14.0" |
There was a problem hiding this comment.
| version: "3.14.0" |
🧪 note: We pin this version until the next release so that Windows tests pass. A follow up PR is available for after this becomes the latest release in #561!
🗣️ ramble: That PR demonstrates failing installation on Windows, but also that the latest versions are gathered as expected on adjacent runners.
| - name: Cache Slack CLI | ||
| if: steps.slack-cli-check.outputs.exists != 'true' && inputs.version != '' | ||
| id: cache-cli | ||
| uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4 | ||
| with: | ||
| path: | | ||
| ${{ runner.os == 'Windows' && '~/AppData/Local/slack-cli' || '~/.slack/bin' }} | ||
| key: slack-cli-${{ runner.os }}-${{ runner.arch }}-${{ inputs.version }} |
There was a problem hiding this comment.
👁️🗨️ note: We avoid caching when latest is used since a missing "version" input can cause stale installations. FWIW both a "clean" install and cached install are fast at around 4 seconds:
🔗 https://github.com/slackapi/slack-github-action/actions/runs/22533375996/job/65276385295#step:3:27
Cache hit for: slack-cli-Linux-X64-3.14.0
Received 7465485 of 7465485 (100.0%), 7.5 MBs/sec
Cache Size: ~7 MB (7465485 B)
| name: "Slack GitHub Action" | ||
| author: "slackapi" | ||
| description: "Send data to Slack to start a Slack workflow in Workflow Builder, call a Slack API method, or post a message into a channel" |
There was a problem hiding this comment.
📣 note: We're renaming this action to match the project name and be more generic of the techniques available. This updates the marketplace page from what I understand. The link might change but I don't believe that must be static. Heads up though!
There was a problem hiding this comment.
📚 question: Should we update the description alongside these changes? This might also appear on the marketplace page.
💡 thought: I didn't change it since the techniques served with these inputs are noted here while the CLI is included in separate configurations. Earlier discussion more with @WilliamBergamin hint that we might deprecate the top-level action for:
- slackapi/slack-github-action/api@v3
- slackapi/slack-github-action/bot@v3
- slackapi/slack-github-action/cli@v3
- slackapi/slack-github-action/wfb@v3But we don't have immediate plans for this.
The "bot" technique also might not be true - it's meant for sending messages with incoming webhooks - but the patterns seem best for separate inputs more! I do think we can still package this action using this same action.yml file.
| codecov_token: ${{ secrets.CODECOV_API_TOKEN }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| extension: js | ||
| include: src |
There was a problem hiding this comment.
🔏 note: This is also removed in #559 but status checks are being reported as error for forked branches at this time.
Summary
This PR adds support for running Slack CLI commands with this GitHub action:
Follows earlier efforts and explorations of @ewanek1 in #486 #488 #489 👾 ✨
Includes
versionoption to pin the installation to a specific version 🤖tokenoption for authenticated commandscommandoption to run with the Slack CLI 🪩Notes
Requirements