Page MenuHomePhabricator

Generating release notes automatically for MobileFrontend
Closed, ResolvedPublic

Description

@bmansurov has introduced versioning MobileFrontend (yay \o/)

One thing that's going to be a pain though is generating the history file. Currently the +2er will have to pull down the file and rerun the script before merging. If they just blindly rebase and +2 the release notes become inaccurate.

Ideally this would be generated by a Jenkins job post merge. It would be great to explore this to make things less painful.

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson moved this task to Incoming on the Web-Team-Backlog board.
Jdlrobson added subscribers: Jdlrobson, bmansurov.

Another alternative is to update this file manually with every patch. I don't see much value in listing commit message titles as release notes. If we do it manually, the problem Jon described won't exist and we'll have an option to expand on what each change does. What do you guys think, @Jhernandez, @phuedx, @kaldari, @rmoen?

So how does it work? I've been looking through the log but haven't seen the commit.

I'm all for automatic change logs which we can clean up before publishing.

For example, generating the changelog with something like

git log --since=1.week --pretty=format:'%h %s' --reverse | grep -v '^.\{7\} Merge\|Localisation'
(Change --since=1.week with v2.1.0...v2.1.1 or COMITSHA...COMITSHA, for actual changelog between versions)

And then manually having a look and removing anything that doesn't seem of interest (or moving things not of interest to an extra section.

I've tried it on gather for the last week and you can see filtering Jenkins crap and the translatewiki bot commits give something fairly good:

6ec45bc Add pagination to Special:GatherList
a531f52 Add pagination on Special:Gather for list of collections
bdf55e5 Pagination of collection itself
0586c47 Fix PHP error for non-initialized variable
48a6460 Fix meta tags for collections
970aa47 Correct the title used in Special:CheckUser for abuse filter rule matches
b52e084 paginate the content overlay list of collections
9088ae6 Fix overriding of vector styles in resources definition
dc42744 Hygiene: Remove empty anchor tag
9750353 Add missing QQQ codes
0a616ad Qunit core tests borked b/c missing resource dependency
399a312 Abuse the hook to add all icons to Minerva
eba9c97 Update watchstar correctly
b80aa23 Fix error handling for edit workflow
41f534f Swap ordering of columns in GatherList
080340e Don't go flaking my heart on images
0f9ba67 i18n: articles -> pages
ce0919f Uppercase for proper noun in apihelp-gather-description
5db8e52 Add gather-anon-view-lists to valid login-error messages
edf700c Tablet styles for Special:Gather/by/User
55321e9 Hygiene: Merge .collection-cards and .collection-items
baf295b Up limit of collections listed in overlay
a4897c6 Link tweakage - point name to user's collections
ebecf12 Hygiene: Consistent use of global php classes
57295f7 Add ogimage tag
75d3223 Hygiene: Remove dependency on mobile watchstar
e08a8ae Redo watchstar creation so inside container
948df66 Correction to ext.gather.api module
87241d4 Hygiene: Create separate module for initialisation

Removing a few crappy commits I think this would be ready, the only problem can be that we do a lot of stuff and the changelog is going to be biiig

I'd be happy to publish such a large changelog alongside a list of the tasks we committed to for the sprint. If we put a little effort into tying 'em together, then I think it'd make for a good read. Like publishing a release on GitHub, I think this is going to require a generation step and a "write the summary" step.

Also, we're going to have to standardise on short tags for the first line of commit messages: Alpha, Beta, and Hygiene etc. This is more for me than it is for anyone else as I tend to revert to square brackets when I'm not thinking.

@Jhernandez, great idea. The script already does what you're trying to do. You can change it to skip lines that match a certain string. Also, I don't see much value in outputting commit SHA in release notes.

@phuedx, I agree. this process should not be fully automated. A blessed human touch is a must. Besides standardizing commit messages, we also need to start thinking about cutting branches with each release.

@bmansurov having the commit sha allows you to poke the log and see the full commit, and the related Bug: TXXX and Change-Id to see gerrit and phabricator tasks, that's why I think it is useful enough. Also, with a bit of tweaking to the script line you can output html/md changelogs with awesome links to the github/gerrit commit

Markdown version (Example):

git log --since=1.week --pretty=format:'%s ([Gerrit](https://gerrit.wikimedia.org/r/#/q/%h,n,z) ∙ [Github](https://github.com/wikimedia/mediawiki-extensions-Gather/commit/%h))' --reverse | grep -v '^.\{7\} Merge\|Localisation'

Html version (Example):

git log --since=1.week --pretty=format:'%s (<a href="https://gerrit.wikimedia.org/r/#/q/%h,n,z">Gerrit</a> - <a href="https://github.com/wikimedia/mediawiki-extensions-Gather/commit/%h">Github</a>)<br/>' --reverse | grep -v '^.\{7\} Merge\|Localisation'


Gist link https://gist.github.com/joakin/f295e654cf207ad33cbf

Forgot to think about phabricator/wikitext changelogs:

git log --since=1.week --pretty=format:'- %s ([[https://gerrit.wikimedia.org/r/#/q/%h,n,z | Gerrit]] ∙ [[https://github.com/wikimedia/mediawiki-extensions-Gather/commit/%h | Github]])' --reverse | grep -v '^.\{7\} Merge\|Localisation'

  • Hygiene: Fix jscs issues in Gather (GerritGithub)
  • Always point to collections menu item when creating a collection (GerritGithub)
  • Deleting collection: hide dialog when finished, toast on refresh (GerritGithub)
  • Design: Improve spacing of content overlay on phones (GerritGithub)
  • Fix flag button, stop unnecessary API request (GerritGithub)
  • Merge "Fix flag button, stop unnecessary API request" (GerritGithub)
  • Save changes to members of collection only when done clicked (GerritGithub)
  • i18n: Tweaks (GerritGithub)
  • i18n: Specify content language directions (GerritGithub)
  • Show hide button on collection itself (GerritGithub)
  • Switch URL used for a collection (GerritGithub)
  • Merge "i18n: Specify content language directions" (GerritGithub)
  • Stop Gather from erroring (GerritGithub)
  • Prevent multiple clicks to flag and detach from dom on confirmation (GerritGithub)
  • hygiene: Consistent collection url generation (GerritGithub)
  • Switch URL used for collection in moderation notification (GerritGithub)
  • Merge "Switch URL used for collection in moderation notification" (GerritGithub)
  • Merge "i18n: Tweaks" (GerritGithub)
  • Making the Gather login and signup messages work in standard way (GerritGithub)
  • Merge "Making the Gather login and signup messages work in standard way" (GerritGithub)
  • Update how deleted pages behave (GerritGithub)
  • Merge "Update how deleted pages behave" (GerritGithub)
  • Write log entries for showlist and hidelist to Special:Log (GerritGithub)
  • When editing collection: Done -> Save (GerritGithub)
  • Hygiene: Remove outdated comment (GerritGithub)
  • Merge "Hygiene: Remove outdated comment" (GerritGithub)
  • Merge "Prevent multiple clicks to flag and detach from dom on confirmation" (GerritGithub)
  • Make it clearer collections are personal opinion (GerritGithub)
  • Hygiene: Remove the 'options' argument from preRender and postRender functions (GerritGithub)
  • Render Collection list items with templates. (GerritGithub)
  • Explicitly define module position (GerritGithub)
  • Merge "Render Collection list items with templates." (GerritGithub)
  • Merge "Explicitly define module position" (GerritGithub)
  • Hygiene: make resource names consistent with their paths (GerritGithub)
  • Merge "Hygiene: make resource names consistent with their paths" (GerritGithub)
  • Hygiene: Correct API module name inconsistency (GerritGithub)
  • QUnit tests: Don't hit the API (GerritGithub)
  • Reflect some upstream changes (GerritGithub)
  • Gather as desktop beta feature infrastructure (GerritGithub)
  • Merge "Make it clearer collections are personal opinion" (GerritGithub)
  • Merge "Hygiene: Correct API module name inconsistency" (GerritGithub)
  • Merge "QUnit tests: Don't hit the API" (GerritGithub)
  • Merge "Reflect some upstream changes" (GerritGithub)
  • Merge "Gather as desktop beta feature infrastructure" (GerritGithub)

@Jhernandez similar command has already been implemented, the problem is to automatically generate these notes and save it to a file and cut a branch/tag.

Jdlrobson renamed this task from Generating release notes automatically to Generating release notes automatically for MobileFrontend.Sep 16 2015, 6:27 PM
Jdlrobson triaged this task as Medium priority.
Jdlrobson edited projects, added MobileFrontend; removed Web-Team-Backlog.
Jdlrobson set Security to None.

So I would advise we do the same for MobileFrontend as we do for QuickSurveys using https://www.mediawiki.org/wiki/Reading/Web/How_to_release

I suggest we clear out the existing code review backlog where it makes sense, do a release and then switch to the dev branch by default.
Any objections to this?

I am strongly in favour of this and of using @Jhernandez's beautifully formatted release notes.

I'm less worried about release notes - we can tweak the script as we go. I think the important thing now is to identify a time when we want to make the switch over.

Jdlrobson claimed this task.
Jdlrobson added a subscriber: jhobs.

@jhobs @bmansurov fyi.
I've setup T113972 so we can do this for Gather. Let's get to a place where we also feel confident to do it for MobileFrontend (T104556). Closing this given it's now captured in those bugs.

git log --since=1.week --pretty=format:'%h %s' --reverse | grep -v '^.\{7\} Merge\|Localisation'

[...]

filtering Jenkins crap

git log supports a --no-merges flag that you can use to filter merges out. For the translate bot, you do still have to use grep -v I believe; there is an --author flag, but I don't think you can invert it.