Skip to content

Commit

Permalink
chore(ci): improved logging; (axios#5451)
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS authored Jan 8, 2023
1 parent 259f5f5 commit 18772ed
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ jobs:
node-version: 16
cache: npm
- run: npm install
- name: release
- name: Prepare release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPE_ARG: ${{ fromJSON('{"auto":"", "patch":"--patch", "minor":"--minor", "major":"--major"}')[github.event.inputs.type] }}
BETA_ARG: ${{ github.event.inputs.beta == 'true' && '--preRelease=beta' || '' }}
run: npm run release -- --ci --verbose --no-git.push --no-git.commit --no-git.tag --no-github $TYPE_ARG $BETA_ARG $DRY_ARG
- name: Add contributors CHANGELOG.md
- name: Add contributors list to CHANGELOG.md
run: npm run release:changelog:fix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions bin/contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const getUserInfo = ((userCache) => async (userEntry) => {
return userCache[email];
}

console.log(`fetch github user info [${userEntry.name}]`);

return userCache[email] = {
...userEntry,
...await getUserFromCommit(commits[0])
Expand Down
10 changes: 7 additions & 3 deletions bin/injectContributorsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ const injectContributors = async (infile, injector) => {

if(currentTag) {
if (hasContributorsSection) {
console.log(`[${currentTag}]: found contribution section`);
console.log(`[${currentTag}]: ✓ OK`);
} else {
const section = await injector(currentTag);
console.log(`[${currentTag}]: ❌ MISSED`);
console.log(`Generating contributors list...`);

console.log(`[${currentTag}]: contribution section not found. Adding...`);
const section = await injector(currentTag);

console.log(`\nRENDERED CONTRIBUTORS LIST [${currentTag}]:`);
console.log('-------------BEGIN--------------\n');
console.log(section);
console.log('--------------END---------------\n');

return section + match;
}
Expand Down
14 changes: 6 additions & 8 deletions templates/pr.hbs
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{{#if files}}
### Build info

### Build info

{{#each files}}
- {{ name}} ({{ path }}) {{ filesize size }} ({{ filesize gzip }} gzipped)
{{#each commits}}
- {{ tag }} - {{filesize size}}
{{/each}}
{{#each files}}
- {{ name}} ({{ path }}) {{ filesize size }} (**{{ filesize gzip }}** gzipped)
{{#each commits}}
- {{ tag }} - {{filesize size}}
{{/each}}

{{/each}}
{{/if}}

0 comments on commit 18772ed

Please sign in to comment.