Skip to content

Add Slackronyms app code#1

Open
Scotchester wants to merge 1 commit into
mainfrom
feature/slack-app-code
Open

Add Slackronyms app code#1
Scotchester wants to merge 1 commit into
mainfrom
feature/slack-app-code

Conversation

@Scotchester

@Scotchester Scotchester commented Jun 3, 2026

Copy link
Copy Markdown
Member

This PR adds the actual Slack app code itself. More PRs to come.

Testing instructions

Subsequent PRs will update the dev container environment, but this can be tested in isolation as follows:

  1. Create Slack app in a test workspace as follows:
    1. Open https://api.slack.com/apps/new and choose From a manifest.
    2. Choose the workspace you want to install the application to.
    3. Replace the contents of the JSON code block with the contents of slackronyms/manifest.json.
    4. Review the configuration and click Create.
    5. Click Install to Workspace and Allow on the screen that follows. You'll then be redirected to the App Configuration dashboard.
  2. Set up env vars:
    1. Open your app's configuration page from this list, click OAuth & Permissions in the left hand menu, then copy the Bot User OAuth Token, then set it with export SLACK_BOT_TOKEN=<token>.
    2. Click Basic Information from the left hand menu and follow the steps in the App-Level Tokens section to create an app-level token with the connections:write scope. Copy this token, then set it with export SLACK_APP_TOKEN=<token>.
  3. cd slackronyms
  4. pip install -r requirements.txt
  5. python ./app.py

You should see output indicating that the app is now running, and you should now be able to invoke it in your Slack test workspace! Try the /define command to confirm.

You can also run the unit tests with pytest in the same directory. (Would still like to add more coverage.)

@Scotchester Scotchester mentioned this pull request Jun 3, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is where all the magic happens.

@Scotchester Scotchester marked this pull request as ready for review June 3, 2026 21:46
@lalver1

lalver1 commented Jun 8, 2026

Copy link
Copy Markdown
Member

I'm looking at the Slack workspace setup in step 1, @Scotchester, and I'm wondering if I can create the test app in the Compiler workspace (if so, I'll prepend luis or something like that to my app in case it gets its name from the manifest.json file) or if I should actually create a whole new Slack testing workspace (and actually I think I have one from some other testing I did last year). Curious about how you set it up, thanks!

@Scotchester

Copy link
Copy Markdown
Member Author

I'm not (yet) aware of a way to prevent an app installed into a workspace from being seen/used by anyone in the workspace, so once installed, anyone could run the /define command, even if the back end is not running or busted.

Also, I am not sure what would happen if multiple apps tried to implement the same command (for example, if your test app was still installed at the time that the production app gets installed).

For those reasons, I did set up my own personal Slack testing workspace to keep testing isolated and simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants