diff --git a/CHANGELOG.md b/CHANGELOG.md index 57d9557..f0fdbcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,14 @@ # Changelog All notable changes to this project will be documented in this file. +## [2.15.1] - 2024-07-19 +### Changes +- Fix on "Build with" link. +- Adds web version announcement. + ## [2.15.0] - 2024-04-27 ### Added -- Support for hosted GitHub variants with non-standard domains (e.g., GitHub Enterprise) +- Support for hosted GitHub variants with non-standard domains (e.g., GitHub Enterprise). ## [2.14.0] - 2024-03-03 ### Added diff --git a/README.md b/README.md index f6e1db0..2de3002 100644 --- a/README.md +++ b/README.md @@ -149,13 +149,13 @@ and print a table like this: | | User | Total comments | Total reviews | Median time to review | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ------------------------- | ------------------ | ------------------- | -| | manuelmhtr
🥇 | **12**
▀▀▀▀▀▀▀▀ | **8**
▀▀▀▀ | 53m
| -| | jartmez
🥈 | 3
▀▀ | 4
▀▀ | 58m
| -| | JohanAlvarado
🥉 | 1
â–€ | 2
â–€ | 1d 16h 18m
▀▀▀▀▀▀ | -| | Estebes10
| 1
â–€ | 1
| **19m**
| -| | ernestognw
| 0
| 2
â–€ | 2h 15m
| -| | Phaze1D
| 0
| 3
â–€ | 1h 28m
| -| | javierbyte
| 0
| 1
| 21h 24m
▀▀▀ | +| | manuelmhtr
🥇 | **12**
▀▀▀▀▀▀▀▀ | **8**
▀▀▀▀ | 53m
| +| | CarlosCRG19
🥈 | 3
▀▀ | 4
▀▀ | 58m
| +| | jartmez
🥉 | 1
â–€ | 2
â–€ | 1d 16h 18m
▀▀▀▀▀▀ | +| | Estebes10
| 1
â–€ | 1
| **19m**
| +| | ernestognw
| 0
| 2
â–€ | 2h 15m
| +| | Phaze1D
| 0
| 3
â–€ | 1h 28m
| +| | javierbyte
| 0
| 1
| 21h 24m
▀▀▀ | ## Stats @@ -265,16 +265,17 @@ This project is maintained by a small team, considering supporting the project b * Joining the [community](https://discord.gg/wk5zy5aAZQ). * Becoming a [sponsor](https://github.com/sponsors/manuelmhtr). -## NEW: We are building the web version! ⚡ +## NEW: Check the web version! ⚡ -![](/assets/web-banner.png) +[Flowwer web preview](https://bit.ly/flowwer-app) -Exciting News! After receiving numerous requests from developers, we're actively developing a stand-alone version of this action! +Breaking News! **We’ve unleashed the stand-alone version of this action!** -**Get early access** by filling out [this form](https://c4tj3h4y5wh.typeform.com/to/Ejo56p27). - -Psst! Current sponsors will receive early access and free premium feature for a limited time 🤫 +* Filter by repositories and date range. +* Stats tracking over the time. +* Tons of new features coming soon! +[Sign up to Flowwer](https://bit.ly/flowwer-app) ## License diff --git a/assets/signup-btn.png b/assets/signup-btn.png new file mode 100644 index 0000000..14e0c0a Binary files /dev/null and b/assets/signup-btn.png differ diff --git a/assets/web-preview.png b/assets/web-preview.png new file mode 100644 index 0000000..b556679 Binary files /dev/null and b/assets/web-preview.png differ diff --git a/dist/index.js b/dist/index.js index bf61f73..071314d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -41244,6 +41244,7 @@ module.exports = { const core = __nccwpck_require__(2186); const github = __nccwpck_require__(5438); +const { t } = __nccwpck_require__(6830); const { subtractDaysToDate } = __nccwpck_require__(9988); const { Telemetry } = __nccwpck_require__(4786); const { fetchPullRequestById } = __nccwpck_require__(8001); @@ -41346,7 +41347,7 @@ module.exports = async (params) => { const octokit = github.getOctokit(githubToken, { baseUrl: getGithubApiUrl() }); const isSponsor = await checkSponsorship({ octokit, org, repos }); const telemetry = new Telemetry({ core, isSponsor, telemetry: params.telemetry }); - if (isSponsor) core.info('Thanks for sponsoring this project! 💙'); + if (isSponsor) core.info(t('execution.logs.sponsors')); try { telemetry.start(params); @@ -41722,7 +41723,7 @@ module.exports = ({ }) => { const sources = buildSources({ buildGithubLink, org, repos }); const message = t('table.subtitle', { sources, count: periodLength }); - const footer = isSponsor ? '' : `\n${t('table.footer')}`; + const footer = isSponsor ? '' : `\n\n${t('table.footer')}`; return `## ${t('table.title')}\n${message}:\n${table}${footer}`; }; @@ -48062,7 +48063,7 @@ module.exports = JSON.parse('{"name":"mixpanel","description":"A simple server-s /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"name":"pull-request-stats","version":"2.15.0","description":"Github action to print relevant stats about Pull Request reviewers","main":"dist/index.js","type":"commonjs","scripts":{"build":"eslint src && ncc build src/index.js -o dist -a","test":"jest","lint":"eslint ./"},"keywords":[],"author":"Manuel de la Torre","license":"MIT","jest":{"testEnvironment":"node","testMatch":["**/?(*.)+(spec|test).[jt]s?(x)"]},"dependencies":{"@actions/core":"^1.10.1","@actions/github":"^6.0.0","axios":"^1.6.7","humanize-duration":"^3.31.0","i18n-js":"^3.9.2","jsurl":"^0.1.5","lodash.get":"^4.4.2","markdown-table":"^2.0.0","mixpanel":"^0.18.0"},"devDependencies":{"@vercel/ncc":"^0.38.1","eslint":"^8.56.0","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jest":"^27.6.3","jest":"^29.7.0"},"funding":"https://github.com/sponsors/manuelmhtr","packageManager":"yarn@4.1.0"}'); +module.exports = JSON.parse('{"name":"pull-request-stats","version":"2.15.1","description":"Github action to print relevant stats about Pull Request reviewers","main":"dist/index.js","type":"commonjs","scripts":{"build":"eslint src && ncc build src/index.js -o dist -a","test":"jest","lint":"eslint ./"},"keywords":[],"author":"Manuel de la Torre","license":"MIT","jest":{"testEnvironment":"node","testMatch":["**/?(*.)+(spec|test).[jt]s?(x)"]},"dependencies":{"@actions/core":"^1.10.1","@actions/github":"^6.0.0","axios":"^1.6.7","humanize-duration":"^3.31.0","i18n-js":"^3.9.2","jsurl":"^0.1.5","lodash.get":"^4.4.2","markdown-table":"^2.0.0","mixpanel":"^0.18.0"},"devDependencies":{"@vercel/ncc":"^0.38.1","eslint":"^8.56.0","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.29.1","eslint-plugin-jest":"^27.6.3","jest":"^29.7.0"},"funding":"https://github.com/sponsors/manuelmhtr","packageManager":"yarn@4.1.0"}'); /***/ }), @@ -48070,7 +48071,7 @@ module.exports = JSON.parse('{"name":"pull-request-stats","version":"2.15.0","de /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"logs":{"success":"Action successfully executed","news":"\\n✨ New on v2.6:\\n• Microsoft Teams integration\\n• Slack integration\\n• Webhooks integration"},"sponsors":{"external":{"fetch":{"success":"External sponsors fetched successfully. {{data}}","error":"Failed to fetch external sponsors. {{error}}"}}},"errors":{"main":"Execution failed with error: {{message}}"}}'); +module.exports = JSON.parse('{"logs":{"success":"Action successfully executed","news":"\\n✨ New web version released! https://app.flowwer.dev","sponsors":"Thanks for sponsoring this project! 💙"},"sponsors":{"external":{"fetch":{"success":"External sponsors fetched successfully. {{data}}","error":"Failed to fetch external sponsors. {{error}}"}}},"errors":{"main":"Execution failed with error: {{message}}"}}'); /***/ }), diff --git a/package.json b/package.json index 518cd5a..919d739 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pull-request-stats", - "version": "2.15.0", + "version": "2.15.1", "description": "Github action to print relevant stats about Pull Request reviewers", "main": "dist/index.js", "type": "commonjs", diff --git a/src/execute.js b/src/execute.js index 289d8e8..2dfb6b7 100644 --- a/src/execute.js +++ b/src/execute.js @@ -1,5 +1,6 @@ const core = require('@actions/core'); const github = require('@actions/github'); +const { t } = require('./i18n'); const { subtractDaysToDate } = require('./utils'); const { Telemetry } = require('./services'); const { fetchPullRequestById } = require('./fetchers'); @@ -102,7 +103,7 @@ module.exports = async (params) => { const octokit = github.getOctokit(githubToken, { baseUrl: getGithubApiUrl() }); const isSponsor = await checkSponsorship({ octokit, org, repos }); const telemetry = new Telemetry({ core, isSponsor, telemetry: params.telemetry }); - if (isSponsor) core.info('Thanks for sponsoring this project! 💙'); + if (isSponsor) core.info(t('execution.logs.sponsors')); try { telemetry.start(params); diff --git a/src/i18n/locales/en-US/execution.json b/src/i18n/locales/en-US/execution.json index a135357..bceef1e 100644 --- a/src/i18n/locales/en-US/execution.json +++ b/src/i18n/locales/en-US/execution.json @@ -1,7 +1,8 @@ { "logs": { "success": "Action successfully executed", - "news": "\n✨ New on v2.6:\n• Microsoft Teams integration\n• Slack integration\n• Webhooks integration" + "news": "\n✨ New web version released! https://app.flowwer.dev", + "sponsors": "Thanks for sponsoring this project! 💙" }, "sponsors": { "external": { diff --git a/src/interactors/__tests__/buildComment.test.js b/src/interactors/__tests__/buildComment.test.js index f3c3372..7d9f2e7 100644 --- a/src/interactors/__tests__/buildComment.test.js +++ b/src/interactors/__tests__/buildComment.test.js @@ -21,7 +21,7 @@ describe('Interactors | .buildComment', () => { it('builds an environment-specific comment using this URL', () => { process.env.GITHUB_SERVER_URL = 'https://github.example.io'; - const expected = `${title}\n${message}\n${TABLE_MOCK}\n${FOOTER}`; + const expected = `${title}\n${message}\n${TABLE_MOCK}\n\n${FOOTER}`; const response = buildComment({ periodLength, table: TABLE_MOCK, org: ORG }); delete process.env.GITHUB_SERVER_URL; expect(response).toEqual(expected); @@ -33,7 +33,7 @@ describe('Interactors | .buildComment', () => { const message = `Stats of the last day for ${linkOrg(ORG)}:`; it('builds the message in singular', () => { - const expected = `${title}\n${message}\n${TABLE_MOCK}\n${FOOTER}`; + const expected = `${title}\n${message}\n${TABLE_MOCK}\n\n${FOOTER}`; const response = buildComment({ periodLength, table: TABLE_MOCK, org: ORG }); expect(response).toEqual(expected); }); @@ -44,7 +44,7 @@ describe('Interactors | .buildComment', () => { const message = `Stats of the last 365 days for ${linkOrg(ORG)}:`; it('builds the message in singular', () => { - const expected = `${title}\n${message}\n${TABLE_MOCK}\n${FOOTER}`; + const expected = `${title}\n${message}\n${TABLE_MOCK}\n\n${FOOTER}`; const response = buildComment({ periodLength, table: TABLE_MOCK, org: ORG }); expect(response).toEqual(expected); }); @@ -56,7 +56,7 @@ describe('Interactors | .buildComment', () => { const message = `Stats of the last day for ${linkRepo(REPO1)} and ${linkRepo(REPO2)}:`; it('builds the message in singular', () => { - const expected = `${title}\n${message}\n${TABLE_MOCK}\n${FOOTER}`; + const expected = `${title}\n${message}\n${TABLE_MOCK}\n\n${FOOTER}`; const response = buildComment({ periodLength, table: TABLE_MOCK, repos }); expect(response).toEqual(expected); }); diff --git a/src/interactors/buildComment.js b/src/interactors/buildComment.js index a460ac3..6b8c7ec 100644 --- a/src/interactors/buildComment.js +++ b/src/interactors/buildComment.js @@ -13,6 +13,6 @@ module.exports = ({ }) => { const sources = buildSources({ buildGithubLink, org, repos }); const message = t('table.subtitle', { sources, count: periodLength }); - const footer = isSponsor ? '' : `\n${t('table.footer')}`; + const footer = isSponsor ? '' : `\n\n${t('table.footer')}`; return `## ${t('table.title')}\n${message}:\n${table}${footer}`; };