Skip to content

Commit

Permalink
docs: update changelog (microsoft#1750)
Browse files Browse the repository at this point in the history
* add script to generate changelog entry

* update change log for R7 release

* remove documentation section

* only output section if there are commits
  • Loading branch information
a-b-r-o-w-n authored Dec 11, 2019
1 parent 978e8a9 commit 99e87dc
Show file tree
Hide file tree
Showing 2 changed files with 207 additions and 8 deletions.
77 changes: 69 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,79 @@

## Releases

### 12-10-2019

#### Added

- feat: show error message in form editor. ([#1737](https://github.com/microsoft/BotFramework-Composer/pull/1737)) ([@alanlong9278](https://github.com/alanlong9278))
- feat: link to tab ([#1738](https://github.com/microsoft/BotFramework-Composer/pull/1738)) ([@lei9444](https://github.com/lei9444))
- feat: Deep linking for the notification page ([#1667](https://github.com/microsoft/BotFramework-Composer/pull/1667)) ([@lei9444](https://github.com/lei9444))
- feat: Align with the new design in form for inline error display ([#1683](https://github.com/microsoft/BotFramework-Composer/pull/1683)) ([@alanlong9278](https://github.com/alanlong9278))
- feat: LG LSP in Composer ([#1504](https://github.com/microsoft/BotFramework-Composer/pull/1504)) ([@zhixzhan](https://github.com/zhixzhan))
- feat: Trigger Node ([#1529](https://github.com/microsoft/BotFramework-Composer/pull/1529)) ([@yeze322](https://github.com/yeze322))
- feat: support default path environment variable ([#1652](https://github.com/microsoft/BotFramework-Composer/pull/1652)) ([@liweitian](https://github.com/liweitian))
- feat: add directlinespeech support ([#1637](https://github.com/microsoft/BotFramework-Composer/pull/1637)) ([@xieofxie](https://github.com/xieofxie))

#### Fixed

- fix: minor styling and labeling for linting ux ([#1716](https://github.com/microsoft/BotFramework-Composer/pull/1716)) ([@cwhitten](https://github.com/cwhitten))
- fix: visual editor lg template don't show ([#1707](https://github.com/microsoft/BotFramework-Composer/pull/1707)) ([@zhixzhan](https://github.com/zhixzhan))
- fix: location select Content component ([#1668](https://github.com/microsoft/BotFramework-Composer/pull/1668)) ([@liweitian](https://github.com/liweitian))
- fix: ability to view storages when in local dev on mac ([#1696](https://github.com/microsoft/BotFramework-Composer/pull/1696)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- fix: dialog name incorrect when creating new dialog in form editor ([#1605](https://github.com/microsoft/BotFramework-Composer/pull/1605)) ([@alanlong9278](https://github.com/alanlong9278))
- fix: support horizontal scrolling in visual eidtor ([#1607](https://github.com/microsoft/BotFramework-Composer/pull/1607)) ([@alanlong9278](https://github.com/alanlong9278))
- fix: Fix interruption sample ([#1624](https://github.com/microsoft/BotFramework-Composer/pull/1624)) ([@luhan2017](https://github.com/luhan2017))
- fix: fix minor LG ref syntax in CardSample ([#1749](https://github.com/microsoft/BotFramework-Composer/pull/1749)) ([@boydc2014](https://github.com/boydc2014))
- fix: add fault tolerance for syntax highlighting ([#1690](https://github.com/microsoft/BotFramework-Composer/pull/1690)) ([@cosmicshuai](https://github.com/cosmicshuai))
- fix: lu change doesn't reflect on form editor ([#1704](https://github.com/microsoft/BotFramework-Composer/pull/1704)) ([@zhixzhan](https://github.com/zhixzhan))
- fix: one lg template error mess up others ([#1733](https://github.com/microsoft/BotFramework-Composer/pull/1733)) ([@zhixzhan](https://github.com/zhixzhan))

#### Changed

- style: Updated Array UI ([#1617](https://github.com/microsoft/BotFramework-Composer/pull/1617)) ([@tdurnford](https://github.com/tdurnford))
- style: update visual editor action title style ([#1710](https://github.com/microsoft/BotFramework-Composer/pull/1710)) ([@yeze322](https://github.com/yeze322))
- refactor: upgrade lg parser and syntax ([#1676](https://github.com/microsoft/BotFramework-Composer/pull/1676)) ([@zhixzhan](https://github.com/zhixzhan))
- refactor: centralize lg parsing logic to 'shared' lib ([#1663](https://github.com/microsoft/BotFramework-Composer/pull/1663)) ([@yeze322](https://github.com/yeze322))
- refactor: convert cypress tests to typescript ([#1630](https://github.com/microsoft/BotFramework-Composer/pull/1630)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- style: update LGTheme ([#1706](https://github.com/microsoft/BotFramework-Composer/pull/1706)) ([@cosmicshuai](https://github.com/cosmicshuai))

#### Other

- docs: R7 Doc Release ([#1743](https://github.com/microsoft/BotFramework-Composer/pull/1743)) ([@Kaiqb](https://github.com/Kaiqb))
- docs: update coveralls badge ([#1621](https://github.com/microsoft/BotFramework-Composer/pull/1621)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- ci: disallow opening pr against stable branch unless a release ([#1740](https://github.com/microsoft/BotFramework-Composer/pull/1740)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- build: add ability to configure runtime path ([#1713](https://github.com/microsoft/BotFramework-Composer/pull/1713)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- build: make docker great again ([#1709](https://github.com/microsoft/BotFramework-Composer/pull/1709)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- chore: Adds license fields, fixes incorrect link, hides some left-nav elements ([#1691](https://github.com/microsoft/BotFramework-Composer/pull/1691)) ([@cwhitten](https://github.com/cwhitten))
- chore: update typescript, eslint and prettier ([#1686](https://github.com/microsoft/BotFramework-Composer/pull/1686)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- build: give more memory available to Node in docker ([#1670](https://github.com/microsoft/BotFramework-Composer/pull/1670)) ([@benbrown](https://github.com/benbrown))
- chore: add startup script to check for oudated versions ([#1674](https://github.com/microsoft/BotFramework-Composer/pull/1674)) ([@cwhitten](https://github.com/cwhitten))
- ci: correctly clean up server process after e2e tests ([#1666](https://github.com/microsoft/BotFramework-Composer/pull/1666)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- chore: enforce node >=12 ([#1665](https://github.com/microsoft/BotFramework-Composer/pull/1665)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- ci: run cypress in single job for now ([#1658](https://github.com/microsoft/BotFramework-Composer/pull/1658)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- ci: do not fail CI if coveralls step fails ([#1655](https://github.com/microsoft/BotFramework-Composer/pull/1655)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- chore: reduce form width to 400px ([#1648](https://github.com/microsoft/BotFramework-Composer/pull/1648)) ([@cwhitten](https://github.com/cwhitten))
- chore: bump browserslist ([#1645](https://github.com/microsoft/BotFramework-Composer/pull/1645)) ([@cwhitten](https://github.com/cwhitten))
- test: allow running composer in hosted mode for tests ([#1356](https://github.com/microsoft/BotFramework-Composer/pull/1356)) ([@p-nagpal](https://github.com/p-nagpal))
- ci: include better information in validate-pr action errors ([#1634](https://github.com/microsoft/BotFramework-Composer/pull/1634)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- chore: add browserslist to dependencies ([#1656](https://github.com/microsoft/BotFramework-Composer/pull/1656)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))
- build: make update script cross platform compatible ([#1687](https://github.com/microsoft/BotFramework-Composer/pull/1687)) ([@a-b-r-o-w-n](https://github.com/a-b-r-o-w-n))

### 11-20-2019

#### Added
* linting and validation UI (#1518) (@lei9444)

- linting and validation UI (#1518) (@lei9444)

#### Changed
* improve build speed and bundle size (#1555) (@a-b-r-o-w-n)
* update `Conversation Started` trigger to `Greeting (Conversation Update)` (#1584) (@liweitian)

- improve build speed and bundle size (#1555) (@a-b-r-o-w-n)
- update `Conversation Started` trigger to `Greeting (Conversation Update)` (#1584) (@liweitian)

#### Fixed
* write QnA Maker endpointKey to settings (#1571) (@VanyLaw)
* fix docs typos (#1575) (@v-kydela)
* prevent double render in visual editor (#1601) (@yeze322)
* fix issue installing lubuild (#1606) (@lei9444)
* fix docker build (#1615) (@cwhitten)

- write QnA Maker endpointKey to settings (#1571) (@VanyLaw)
- fix docs typos (#1575) (@v-kydela)
- prevent double render in visual editor (#1601) (@yeze322)
- fix issue installing lubuild (#1606) (@lei9444)
- fix docker build (#1615) (@cwhitten)
138 changes: 138 additions & 0 deletions scripts/generate-changelog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
const fs = require("fs");
const { execSync } = require("child_process");

const PULL_URL = "https://github.com/microsoft/BotFramework-Composer/pull";

const AUTHORS = {
"Andy Brown": "a-b-r-o-w-n",
"Chris Whitten": "cwhitten",
"Kamran Iqbal": "Kaiqb",
"Dong Lei": "boydc2014",
"Long Alan": "alanlong9278",
"TJ Durnford": "tdurnford",
leileizhang: "lei9444",
zeye: "yeze322",
"Zhixiang Zhan": "zhixzhan",
"Shuai Wang": "cosmicshuai",
liweitian: "liweitian",
"Ben Brown": "benbrown",
"Pooja Nagpal": "p-nagpal",
xieofxie: "xieofxie",
"Lu Han": "luhan2017"
};

const getLog = () =>
execSync("git log --pretty=format:'%s | %an' stable..master")
.toString()
.split("\n");

const getDate = () =>
execSync('date +"%m-%d-%Y"')
.toString()
.trim();

const SECTIONS = {
Added: ["feat"],
Fixed: ["fix"],
Changed: ["refactor", "style"],
Other: []
};
const tagToSection = Object.keys(SECTIONS).reduce((acc, section) => {
const groupTags = SECTIONS[section].reduce(
(s, t) => ({
...s,
[t]: section
}),
{}
);

return {
...acc,
...groupTags
};
}, {});

const getCommitSection = commit => {
for (const tag in tagToSection) {
if (commit.startsWith(tag)) {
return tagToSection[tag];
} else if (!/^\w+:/.test(commit)) {
return "Uncategorized";
}
}

return "Other";
};

const formatMessage = msg =>
msg.replace(/\(\#(\d+)\)/, `([#$1](${PULL_URL}/$1))`);

const logCache = new Set();
const logOnce = (key, message) => {
if (!logCache.has(key)) {
process.stderr.write(message + "\n");
logCache.add(key);
}
};

const formatAuthor = author => {
const username = AUTHORS[author];

if (!username) {
logOnce(author, `${author} missing from username map`);
return `${author}`;
}

return `([@${username}](https://github.com/${username}))`;
};

const formatCommit = commit => {
const [message, author] = commit.split(" | ");

return [formatMessage(message), formatAuthor(author)];
};

function groupCommits(commits) {
return commits.reduce((groups, commit) => {
const section = getCommitSection(commit);
const [message, author] = formatCommit(commit);

if (!groups[section]) {
groups[section] = [];
}

groups[section].push(`${message} ${author}`);

return groups;
}, {});
}

const formatChangeLog = groups => {
const date = getDate();
let output = `### ${date}`;

for (const section in SECTIONS) {
if (groups[section] && groups[section].length > 0) {
output += `\n\n#### ${section}\n\n`;

output += groups[section].map(c => `- ${c}`).join("\n");
}
}

// Uncategorized
if (groups.Uncategorized) {
output += "\n\n Uncategorized\n\n";
output += groups.Uncategorized.map(c => `- ${c}`).join("\n");
}

return output;
};

function run() {
const commits = getLog();
const groups = groupCommits(commits);
const output = formatChangeLog(groups);
console.log(output);
}

run();

0 comments on commit 99e87dc

Please sign in to comment.