Notifies in Slack channel with a list of jira tickets that have pending review from x days. Adds the reviewer and PR details if exists.
Project description
# Slack Bot Jira Review Reminder Notifies in Slack channel with a list of jira tickets that have pending review from x days. Adds the reviewer and PR details if exists.
###Installation `buildoutcfg pip install jira-reviews-reminder ` ### Usage
After installing the package run below command: `buildoutcfg SLACK_TOKEN=<your slack token> SLACK_CHANNEL=<> JIRA_PROJECT=<> JIRA_USER=<jira user email/ID> JIRA_TOKEN=<> IGNORE_JIRA=<> ISSUE_CHANGED_BEFORE=<> JIRA_SERVER=<> ISSUE_PAGE_SIZE=<> SLACK_USERS_GROUP=<> JIRA_REVIEWER_FIELD=<> jira-reviews-reminder ` This script will run and exit. So, preferably schedule a cron job.
#### Example: To run every day 11 AM and 5 PM `buildoutcfg 0 11,17 * * * SLACK_TOKEN=<your slack token> SLACK_CHANNEL=<> JIRA_PROJECT=<> JIRA_USER=<jira user email/ID> JIRA_TOKEN=<> IGNORE_JIRA=<> ISSUE_CHANGED_BEFORE=<> JIRA_SERVER=<> ISSUE_PAGE_SIZE=<> SLACK_USERS_GROUP=<> JIRA_REVIEWER_FIELD=<> jira-reviews-reminder `
### Environment Variables
##### SLACK_TOKEN Create a slack bot app and get the Bot User OAuth Token. Use it as Env variable.
<a href=”https://slack.com/intl/en-in/help/articles/115005265703-Create-a-bot-for-your-workspace”>Instructions to create Slack Bot</a>
> Make sure your bot has all necessary permissions/scopes: > users:read.email, chat:write.public, channels:read, channels:join
##### SLACK_CHANNEL Slack channel of your team/jira project. No need to prefix with #
##### JIRA_PROJECT The jira project key of your team. Tickets belonging to these projects will be processed.
TODO: Pass comma separated projects, if multiple projects need to be assessed.
##### JIRA_USER and JIRA_TOKEN Jira user ID/email and user/app token - need this to authorize the jira client.
##### IGNORE_JIRA (Optional) Comma separated Jira IDs. Any jira ID passed in this env variable will not be processed.
##### ISSUE_CHANGED_BEFORE This variable is used to trigger reminder if the ticket is in review state from x unti of time.
Example: If the variable value is -1d. Only those jira will be processed which are in In Review state for more than 1 day.
##### JIRA_SERVER Jira hosted server - to establish connection.
Example: https://something.atlassian.net
##### ISSUE_PAGE_SIZE (Optional) Maximum number of issues to assess that are In review. > defaults to 20
#### SLACK_USERS_GROUP (Optional) This is your team’s slack user group. If a ticket doesn’t have any reviewer, this user group is tagged in Slack notification.
##### JIRA_REVIEWER_FIELD A few of the attributes in jira ticket are placed in dynamic fields/custom fields. This could be different for different projects.
Find out which field in the API response corresponds to the Reviewers field.
Example: customfield_10200
API Details: > GET /rest/api/2/issue/your_jira_ID
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jira_reviews_reminder-0.1.2-py3-none-any.whl.
File metadata
- Download URL: jira_reviews_reminder-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c076dd65ca3a97a894269b2e00174f0e659b97944a6141a63cb4ce5d1a30ccd2
|
|
| MD5 |
07e5c5c4c36fd8a1dabb35f1279aa0d5
|
|
| BLAKE2b-256 |
30826a53e5c75a9e8a92455284355865a6471c1055fcf5e65700839b9df13783
|