Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.28 KB

File metadata and controls

26 lines (20 loc) · 1.28 KB

Slack Lambda "Main"

Slack Lambda Function to be used in AWS Lambda. This function handles incoming requests from Slack, verifies the request signature, and processes commands sent to the Slack bot.

Some commands also fork off another lambda function where the processing takes longer.

Command /hi can just validate that the Lambda is up and running.

Command /sprint-overview shows a sprint overview and which PRs are linked to Jira, and which PRs are not linked yet. The command /pr2jira is the older alias of this.

Environment variables:

  • USER_MAP_FILE defaults to usermap.yaml containg the slack-jira-github user map
  • GITHUB_ORGANIZATION the organization to query the repositories and their PRs
  • JIRA_BOARD_ID The Jira board where the backlog filter and sprint issues are queried from
  • JIRA_CURRENT_SPRINT_URL a URL shown to the user to get to the current sprint
  • JIRA_BACKLOG_URL a URL shown to the user to get to the backlog
  • SECRETMANAGER_AWS_REGION where the secrets manager is deployed, defaults to us-east-1

Those AWS secrets are expected to be available:

  • SCHUTZBOT_GITHUB_TOKEN the token to access github
  • SLACK_COMMAND_JIRA_TOKEN the token to access jira
  • SLACK_SCHUTZBOT_SIGNING_SECRET the signing secret of slack to verify incomming messages/requests