Create a Release Note
A release note is information about changes, updates, or improvements made in a new version of software or application. The main purpose of release notes is to inform users or viewers about new features, bug fixes, and performance improvements. The release notes can be found by users through the App Store or Play Store.
In creating a release note, it can be assisted with Bash scripting and OpenAI. Here are the steps that must be followed:
Setup Environment Configuration
- Create
.release_notes_config.envat./mobile_scripts/release_notes/directory path. - The file must contain the following variables:
OPENAI_API_KEY=OPEN_API_KEY_VALUES
SLACK_WEBHOOK_URL=SLACK_WEBHOOK_URL_VALUESnoteRequest the environment variables values to the person in charge in Mobile Team or Tech Manager.
- Change the current directory path from the root to
./mobile_scripts/release_notes/using the terminal.
Execute The Release Notes
- Execute the release note you made in the previous step in Terminal
bash release_notes.sh - After running the command above, it will show you a question with options. The details of the terms and conditions of each option will be explained further.
Which source of data do you want to use to generate the release notes?
1. Template (Default)
2. Git history
Enter the number of your choice:
Data Source Type: Template
The Template type creates release notes using OpenAI to generate abstract sentences without detailing the changes, preventing sensitive or overly technical information from being shared with users. You can find the template content in the .release_notes_template.env file.
Which type of template do you want to use?
1. Bug
2. Feature
3. Both (Default)
Enter the number of your choice:
Each template has the following writing style:
- The
Bugtemplate informs users that the latest version of the app contains various bug fixes. - The
Featuretemplate informs users that the latest update of the app includes improvements to existing features or the addition of new features. - The
Bothtemplate is a combination template that provides information about both bug fixes and feature updates in the latest version of this app.
Select one of the three templates based on your needs by entering the corresponding number in the terminal, and then the tool will start sending requests to OpenAI to create abstract release notes.
Data Source Type: Git History
The Git history type allows you to create highly descriptive release notes based on all the branches integrated throughout the development cycle of the latest version of the application. For example, the next step will be displayed as follows.
The following branches have been merged into dev:
feature/improve_user_experience_when_checkout
bugfix/bnsp_category_show_on_ksk
Do you want to exclude certain branches? (y = yes, n = no, default is 'n'):
For branches that contain sensitive information or are considered overly technical for users, you can exclude them from being highlighted in the release notes.
To exclude a specific branch, enter y on the terminal, and then select the branch to exclude by pressing the tab key. Excluded branches will be marked with the extra character > at the beginning of the branch name. For example, > bugfix/screen_a_not_show_loading_state.
Navigate between branch names by using the up or down buttons.
After selecting the branches to exclude, press enter to submit a list of branch names to be excluded from the release record. If there are no branches that need to be excluded, skip this process by entering n. OpenAI then creates the release notes based on the selected branch names.
Confirming Release Notes Results
OpenAI will generate a release record, for example, the result will be displayed as follows.
Here are the generated release notes:
Halo Arkawan!
Kami senang mengumumkan pembaruan untuk aplikasi Arkademi. Misi kami adalah memberikan pengalaman belajar terbaik dan pembaruan ini diharapkan semakin mendekatkan Anda pada tujuan tersebut.
Fitur-fitur baru dan peningkatan kualitas telah ditambahkan demi memudahkan perjalanan belajar Anda. Nikmati terus berbagai pengetahuan di Arkademi. Selamat belajar, Arkawan!
Are you satisfied with these release notes? (y = yes, n = no, default is 'y'):
You will be required to confirm whether you are satisfied with the release notes generated by OpenAI. If not, type n. Then the tool will repeat the request to OpenAI to create a release record based on the previously selected data source type and display the result again.
If satisfied with the result, enter y or press enter. It will save the result to the release_notes.json file.
At the end of the process, you will be given the option to share the generated release notes with the mobile-avenger group in Slack. This can be useful for informing the group about the content of the created release notes.
To share the generated release notes in Slack, enter y in the terminal. The tool will create the payload and send the message to the mobile-avenger group in Slack. Otherwise, skip this step by entering n or pressing enter.
This is how the release notes feature works.
6 August 2024
Writer: Kai
Editor: Media