Skip to content

Commit

Permalink
v2.9.0: Remove "-review:none" filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelmhtr committed Jun 3, 2023
2 parents 3fe3eee + cb7382c commit f775ae0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.9.0] - 2023-06-03
### Added
- [#70](https://github.com/flowwer-dev/pull-request-stats/pull/70) Removes `-review:none` filter. Let PRs with requested changes be included in the stats (By [Danny McCormick](https://github.com/damccorm)).

## [2.8.1] - 2023-03-20
### Added
- Reference to "Recap" action.
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13901,7 +13901,7 @@ const ownerFilter = ({ org, repos }) => {

const buildQuery = ({ org, repos, startDate }) => {
const dateFilter = `created:>=${startDate.toISOString()}`;
return `type:pr -review:none sort:author-date ${ownerFilter({ org, repos })} ${dateFilter}`;
return `type:pr sort:author-date ${ownerFilter({ org, repos })} ${dateFilter}`;
};

const getPullRequests = async (params) => {
Expand Down Expand Up @@ -15458,7 +15458,7 @@ module.exports = function bind(fn, thisArg) {
/***/ 731:
/***/ (function(module) {

module.exports = {"name":"pull-request-stats","version":"2.8.1","description":"Github action to print relevant stats about Pull Request reviewers","main":"dist/index.js","scripts":{"build":"eslint src && ncc build src/index.js","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.5.0","@actions/github":"^5.0.0","axios":"^0.26.1","humanize-duration":"^3.27.0","i18n-js":"^3.9.2","jsurl":"^0.1.5","lodash.get":"^4.4.2","markdown-table":"^2.0.0","mixpanel":"^0.13.0"},"devDependencies":{"@zeit/ncc":"^0.22.3","eslint":"^7.32.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.24.1","eslint-plugin-jest":"^24.4.0","jest":"^27.0.6"},"funding":"https://github.com/sponsors/manuelmhtr"};
module.exports = {"name":"pull-request-stats","version":"2.9.0","description":"Github action to print relevant stats about Pull Request reviewers","main":"dist/index.js","scripts":{"build":"eslint src && ncc build src/index.js","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.5.0","@actions/github":"^5.0.0","axios":"^0.26.1","humanize-duration":"^3.27.0","i18n-js":"^3.9.2","jsurl":"^0.1.5","lodash.get":"^4.4.2","markdown-table":"^2.0.0","mixpanel":"^0.13.0"},"devDependencies":{"@zeit/ncc":"^0.22.3","eslint":"^7.32.0","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.24.1","eslint-plugin-jest":"^24.4.0","jest":"^27.0.6"},"funding":"https://github.com/sponsors/manuelmhtr"};

/***/ }),

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pull-request-stats",
"version": "2.8.1",
"version": "2.9.0",
"description": "Github action to print relevant stats about Pull Request reviewers",
"main": "dist/index.js",
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions src/interactors/__tests__/getPulls.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,22 @@ describe('Interactors | .getPulls', () => {
it('queries the correct date', () => {
const tDate = '2021-06-12T06:00:00.000Z';
const params = { ...input, startDate: new Date(tDate) };
const expectedQuery = `type:pr -review:none sort:author-date repo:${input.repos[0]} created:>=${tDate}`;
const expectedQuery = `type:pr sort:author-date repo:${input.repos[0]} created:>=${tDate}`;
return testQuery({ params, expectedQuery });
});

it('queries for multiple repos when sending multiple', () => {
const repos = ['org1/repo1', 'org1/repo2', 'org2/repo3'];
const params = { ...input, repos };
const reposFilter = `repo:${repos[0]} repo:${repos[1]} repo:${repos[2]}`;
const expectedQuery = `type:pr -review:none sort:author-date ${reposFilter} created:>=${date}`;
const expectedQuery = `type:pr sort:author-date ${reposFilter} created:>=${date}`;
return testQuery({ params, expectedQuery });
});

it('queries for an organization when sending one, ignores repos if passed', () => {
const org = 'mycoolorganization';
const params = { ...input, org };
const expectedQuery = `type:pr -review:none sort:author-date org:${org} created:>=${date}`;
const expectedQuery = `type:pr sort:author-date org:${org} created:>=${date}`;
return testQuery({ params, expectedQuery });
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/interactors/getPulls.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const ownerFilter = ({ org, repos }) => {

const buildQuery = ({ org, repos, startDate }) => {
const dateFilter = `created:>=${startDate.toISOString()}`;
return `type:pr -review:none sort:author-date ${ownerFilter({ org, repos })} ${dateFilter}`;
return `type:pr sort:author-date ${ownerFilter({ org, repos })} ${dateFilter}`;
};

const getPullRequests = async (params) => {
Expand Down

0 comments on commit f775ae0

Please sign in to comment.