Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DevTools][BE] Read username using gh in release script #25270

Merged
merged 3 commits into from
Sep 16, 2022

Conversation

tyao1
Copy link
Contributor

@tyao1 tyao1 commented Sep 15, 2022

The script required manually filling github names in the changelog, this PR is to automate this process.
If gh is installed, use github API to fetch PR author.
Also, improves [DevTools] tag removal.

Some of generated change log looks like the following:

@sizebot
Copy link

sizebot commented Sep 15, 2022

Comparing: e7fc04b...8940bbe

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 135.04 kB 135.04 kB = 43.33 kB 43.33 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 142.50 kB 142.50 kB = 45.51 kB 45.51 kB
facebook-www/ReactDOM-prod.classic.js = 489.88 kB 489.88 kB = 87.21 kB 87.21 kB
facebook-www/ReactDOM-prod.modern.js = 475.17 kB 475.17 kB = 85.01 kB 85.01 kB
facebook-www/ReactDOMForked-prod.classic.js = 489.88 kB 489.88 kB = 87.21 kB 87.21 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 8940bbe

line = line.replace('[DevTools] ', '');

for (let line of rawLog.split('\n')) {
line = line.replace(/^\[[dD]ev[tT]ools\]? /, '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the i flag for case insensitive this simplifies a bit. I also think you have the ? not where intended (optional ], but you probably wanted to strip optional spaces. * matches any number of spaces.

Suggested change
line = line.replace(/^\[[dD]ev[tT]ools\]? /, '');
line = line.replace(/^\[devtools\] */i, '');

@tyao1 tyao1 merged commit 8951c5f into facebook:main Sep 16, 2022
rickhanlonii pushed a commit that referenced this pull request Oct 5, 2022
* [DevTools][BE] Read username using gh in release script

* better regex & fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants