react-native-community / releases

React Native releases
https://github.com/facebook/react-native/
1.5k stars 407 forks source link

[changelog] Fix missing and duplicate entries #161

Closed alloy closed 4 years ago

alloy commented 4 years ago

Closes #160

Finally, here’s an example of the logs and here’s an example of the generated markdown. As you can see, there’s a lot more entries there than in the one that’s currently PR’ed.

You can run that locally with:

yarn generate -b v0.61.5 -c v0.62.0-rc.3 -r path/to/react-native/repo -f ./CHANGELOG.md -t [GITHUB-TOKEN]

Follow-up work:

alloy commented 4 years ago

Alright, this should be finished and good to review. The last commit that I will add to this PR before merging is to update the last MINOR version CHANGELOG entries to use canonical master commits.

alloy commented 4 years ago

All done ✨

kelset commented 4 years ago

I'm really grateful that you managed to work on this Eloy, this PR looks awesome and it's so so helpful 🙇‍♂️

I'll be checking it out more closely tomorrow, in the meantime I've added Eli to the reviewers since he also worked on the script.

One thing I've noticed is that some entries still retain variations on Changelog: [iOS] [Fixed] tags instead of the titles but I guess it's normal and we can handle those manually post generation.


Btw in particular this line Changelog: [iOS] [Fixed] (cb80e3b by @priteshrnandgaonkar) doesn't have any actual info about the commit but if I click on the hash to go back to the main repo it's 404-ing me...?

TheSavior commented 4 years ago

Seems good enough to iterate from as we make more improvements!

alloy commented 4 years ago

Btw in particular this line Changelog: [iOS] [Fixed] (cb80e3b by @priteshrnandgaonkar) doesn't have any actual info about the commit but if I click on the hash to go back to the main repo it's 404-ing me...?

@kelset Ooh, interesting, happy birthday problem! Looks like RN is already too large to shorten hashes to 7 characters 😱 The actual hash is cb80e3b599d0a781af8ad2999c4f1b58a11de05f, when shortened to 8 characters it will work, but when shortened to 7 it cannot be found (which I assume means GH encountered a collision).

$ git show cb80e3b
error: short SHA1 cb80e3b is ambiguous
hint: The candidates are:
hint:   cb80e3b599 commit 2020-02-12 - @allow-large-files [Flipper][RN] Integrated Flipper in RNTester application
hint:   cb80e3b388 tree

We can either pick an arbitrary larger number or just not shorten. I’m in favour of the simple thing, which would be to just use the full hashes. Opinions?

alloy commented 4 years ago

I was thinking that perhaps GitHub would truncate them for us, but seeing as the changelog isn’t even in the same repo that definitely won’t work. In that case let’s truncate the hashes to 10 chars for display only and use full hashes for the links.

kelset commented 4 years ago

In that case let’s truncate the hashes to 10 chars for display only and use full hashes for the links.

sounds great 👍