Skip to content

Commit

Permalink
Release 1.0.1 (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
nitzanashi authored Aug 26, 2021
1 parent 90ef043 commit 8b24475
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@nitzanashi @gotbahn
* @nitzanashi @gotbahn
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.0.1 - 26.08.2021

### Changed
- Increased the amount of results for `List reviews for a pull request` from 30 to 100

### Infrastructure
- Renamed package to `reviewers`

## 1.0.0 - 18.08.2021

Initial implementation
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Auto Reviewers
# Reviewers

GitHub Action to recognize and assign reviewers and codeowners

Expand Down
9 changes: 6 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auto-reviewers",
"version": "1.0.0",
"name": "reviewers",
"version": "1.0.1",
"description": "GitHub Action to recognize and assign reviewers and codeowners",
"main": "src/index.js",
"scripts": {
Expand All @@ -22,9 +22,9 @@
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/zattoo/label-on-changes/issues"
"url": "https://github.com/zattoo/reviewers/issues"
},
"homepage": "https://github.com/zattoo/label-on-changes#readme",
"homepage": "https://github.com/zattoo/reviewers#readme",
"dependencies": {
"@actions/core": "1.4.0",
"@actions/github": "5.0.0",
Expand Down
9 changes: 6 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,14 @@ const PATH_PREFIX = process.env.GITHUB_WORKSPACE;
* @returns {Promise<Record<string, object>>}
*/
const getReviewers = async () => {
const allReviewersData = (await octokit.rest.pulls.listReviews({
// pagination is not possible see https://github.com/octokit/rest.js/issues/33
const listReviews = (await octokit.rest.pulls.listReviews({
...repo,
pull_number,
})).data;
per_page: 100,
}));

const allReviewersData = listReviews.data;

const latestReviews = {};

Expand Down Expand Up @@ -154,7 +158,6 @@ const PATH_PREFIX = process.env.GITHUB_WORKSPACE;
return !allApprovedFiles.includes(file);
});


if (filesWhichStillNeedApproval.length > 0) {
core.warning("No sufficient approvals can't approve the pull-request");
core.info(utils.createRequiredApprovalsComment(codeowners, filesWhichStillNeedApproval, PATH_PREFIX));
Expand Down

0 comments on commit 8b24475

Please sign in to comment.