Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webhooksite/scripts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: RickCogley/scripts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: patch-1
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Aug 13, 2021

  1. Create slack_hmac_check.ws

    In a Slack app, you can specify a slash command and set a webhook such as one from webhook.site. Slack expects an HMAC check, and in the app you can find a shared secret to use for the webhook.site-side re-calculation. It works as needed using the new hmac() function, and the script will exit if the received signature and locally re-calculated signature don't match. The rest of the script assembles an array using the request.form params that come from Slack, converts it to json, and uploads it to a web service for reference. In our case, we have a Slack command "/iam" which lets us enter something like `/iam @acme working on the server` to indicate our status to peers and for linking to Time and Expense entries in our database.
    RickCogley authored Aug 13, 2021
    Copy the full SHA
    ab3b433 View commit details
Loading