Slack utility for membership information
We currently have the /u command on slack to look up users. It would be nice to do the same for our members:
e.g.,
/m IBM would return “IBM: Membership - Strategic; Member Representative - Pradeep Balachandran”.
/m Shopify would return “No Member”
There are cases where a partial spelling returns multiple results. e.g.,
/m Micro ideally would return
“Microsoft: Membership - strategic; Member Representative - Stephen Walli”
“MicroEJ: Membership - Contributing; Member Representative - Fred Rivard”
For reference, this is the code for the /u command:
Slack Integration Information
I've created the integration of the slack command with the following info:
- URL: https://membership-staging.eclipse.org/api/slack/organizations (We can change this to prods when we are ready)
- METHOD: POST (Slack will do a post request to https://membership-staging.eclipse.org/api/slack/organizations)
- TOKEN: @malowe I will send you an email with API token
- COMMAND: /m
Outgoing Data
When a matching chat message is received, a POST will be sent to the URL specified below. The data is defined as follows:
token=xyzxyzxyzxyzxyzxyz
team_id=T0001
team_domain=example
channel_id=C2147483705
channel_name=test
user_id=U2147483697
user_name=Steve
command=/weather
text=94070
response_url=https://hooks.slack.com/commands/1234/5678
Responding
Your URL should respond with the text to reply to the user unless no response is necessary. If responding, the response must be returned within 3000ms of the request. Any non-200 response will result in an error to the user. You may also send delayed or multiple responses by invoking the response_url.
Access
Each POST request must be validated by verifying the API token and the team_domain which is eclipsefoundation
before returning membership data.
//cc @pwhited3w @zfazli @droy