botframework-sdk/tools/changelog
Steven Gum 6a4e63e21a
add changelog script git-log.js and gitignore python virtual environments (#6092)
* add changelog script git-log.js

* apply PR feedback and remove HISTORY.md
2020-10-28 09:22:39 -07:00
..
.gitignore add changelog script git-log.js and gitignore python virtual environments (#6092) 2020-10-28 09:22:39 -07:00
README.md add changelog script git-log.js and gitignore python virtual environments (#6092) 2020-10-28 09:22:39 -07:00
git-log.js add changelog script git-log.js and gitignore python virtual environments (#6092) 2020-10-28 09:22:39 -07:00

README.md

Generating repository changelogs

This script uses the developer's clone of the repository to generate a changelog via git log.

Requirements:

Preferred setup:

  • Each repository should only permit squash merges
    • In most scenarios, the developer calling the script will need to manually update the final contents with better descriptions.
    • If the repository accepts all PR merge types, the developer will need to perform more manual edits due to the commit messages.
    • Squash merges on GitHub result in commit messages like the following: "Fix fetch in token server used in E2E Streaming Test (#2944)"
    • Other merges will result in commit messages such as: "Merge pull request #1411 from <fork/branch>"
    • This results in a non-descriptive format:
    - Merge pull request #4661 from microsoft/johtaylo/private-cloud-patch [[PR 4661]](https://github.com/microsoft/botbuilder-dotnet/pull/4661)
    
  • Developers should generate the changelog from the branch that is about to be released
    • Instead of generating it on the default or development branch (e.g main), the script should be run on the version branch (e.g. 4.11).

Steps

The steps below use botbuilder-dotnet as an example.

  • Clone the target repository and switch to the selected branch for generating a changelog.
    • git clone -b 4.11 https://github.com/microsoft/botbuilder-dotnet && cd botbuilder-dotnet
  • Run git log with the following flags and arguments.
    • git log --show-pulls --pretty=tformat:"%s" c6ff4a4.. > dotnet.txt
    • c6ff4a4.. represents the desired range of commits to log after commit c6ff4a4.
    • In this example, c6ff4a4 was the latest commit included in the previous changelog.
  • Move the dotnet.txt file to the folder containing git-log.js.
  • Navigate to botframework-sdk\tools\changelog in your CLI.
  • Execute the following command to generate the changelog.
    • node git-log.js dotnet.txt
    • With this command, the changelog can be found as dotnet.md.
    • git-log.js takes an optional second argument which is used as the filename for the output. (Note: the files content will still be Markdown)

The contents of the file should look like the following snippet generated for the 4.11.0 release of the Bot Framework SDK for .NET:

- Teams: MeetingParticipantInfo.InMeeting might be null, if unknown [[PR 4868]](https://github.com/microsoft/botbuilder-dotnet/pull/4868)
- Fix issues with ExpectReplies and Invoke [[PR 4845]](https://github.com/microsoft/botbuilder-dotnet/pull/4845)
- Enable middleware in TestScript and refactor BeginSkill tests [[PR 4866]](https://github.com/microsoft/botbuilder-dotnet/pull/4866)

Questions and Help

For bug reports, feature requests or other feedback, please file an issue in https://github.com/microsoft/botframework-sdk.

Additional reading