The Automated Release Management Script is a Google Apps Script-based solution designed to assist individuals and managers in efficiently tracking and managing their Pull Requests (PRs) for monthly or weekly releases. It operates based on the Release Calendar, sending reminders via Slack, notifying team members about upcoming release deadlines, and ensuring that all PRs are addressed and merged before the code freeze or release date.
- Automatic reminders for weekly and monthly releases.
- Customizable messages based on release type and status.
- Integration with Slack for seamless communication.
Before setting up the Release Reminder Tool, ensure you have the following:
- Google Account: You need a Google account to use Google Apps Script.
- Slack Workspace: You must be a member of a Slack workspace to send reminders.
- GitHub Account: You'll need access to generate a Personal Access Token.
- Google AppScript: Checkout script from GitHub.
To generate a GitHub Personal Access Token:
- Log in to your GitHub account.
- Go to Settings > Developer settings > Personal access tokens.
- Click on Generate new token.
- Enter a meaningful name for the token.
- Select the following scopes to grant the necessary permissions:
- repo: Full control of private repositories
- read:user: Read all user profile data
- user:email: Access user email addresses (read-only)
- Click Generate token.
- Copy the generated token. This token will be used to authenticate GitHub API requests in the Release Reminder Tool.
To create a Slack webhook URL:
- Log in to your Slack workspace.
- Go to Settings & administration > Manage apps.
- Click on Custom Integrations.
- Select Incoming Webhooks.
- Click on Add to Slack.
- Choose a channel where you want to receive reminders and click Add Incoming Webhooks integration.
- Copy the generated webhook URL. This URL will be used in the Release Reminder Tool to send messages to Slack.
To map GitHub usernames to Slack user IDs:
- Create a mapping between each developer's GitHub username and their respective Slack user ID.
- Obtain Slack user IDs by following these steps:
- Open Slack and navigate to the user's profile you want to get the ID for.
- Click on the three dots (ellipsis) icon located at the top right corner of the profile window.
- In the dropdown menu, click on Copy member ID.
- Update the
GH_USERNAME_2_SLACK_IDS
constant in theconstants.gs
file with the mapping information. This ensures that the script can mention team members in Slack messages.
After completing the prerequisites and setup steps:
- Open the Google Apps Script editor.
- Copy and paste the provided scripts (
constants.gs
,datetime.gs
,messages.gs
,reminder.gs
,slack.gs
,github.gs
) into separate files. - Save each file with the corresponding name.
- Set up triggers for the
setWeeklyReleaseReminder
andsetMonthlyReleaseReminder
functions to run at desired intervals (e.g., weekly, monthly). - Once triggers are set, the Release Reminder Tool will automatically send reminders via Slack for weekly and monthly releases based on your release calendar.
Open Google Apps Script and navigate to your project.
In the script editor, open the reminder.gs
file.
Locate the setMonthlyReleaseReminder
function.
Modify the calculateDatesBefore
function parameters within setMonthlyReleaseReminder
to adjust the reminder dates.
Adjust the trigger settings within the loop to set the reminders at your preferred time.
Save your changes in the script editor.
Open Google Apps Script and navigate to your project.
In the script editor, open the reminder.gs
file.
Locate the setWeeklyReleaseReminder
function.
Modify the calculateDatesBefore
function parameters within setWeeklyReleaseReminder
to adjust the reminder dates.
Adjust the trigger settings within the loop to set the reminders at your preferred time.
Save your changes in the script editor.
Follow these steps to set up the Release Reminder Tool for Slack, ensuring smooth communication and efficient release management within your team. If you encounter any issues or require further assistance, refer to the respective platform documentation or seek support from @Nguyen Thien Thanh or your team members.