Skip to content

Commit

Permalink
responding to feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
zlayaAvocado committed Dec 23, 2024
1 parent d61fa2c commit 3fa0fb6
Show file tree
Hide file tree
Showing 16 changed files with 1,103 additions and 339 deletions.
28 changes: 7 additions & 21 deletions .github/actions/require-multiple-reviewers-v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ A GitHub Action that requires multiple reviewers for important files

## Inputs

| Name | Required | Description | Default |
| ---------------------- | -------- | ---------------------------------------------------------- | ------- |
| `token` | Yes | A GitHub token with the required permissions | NA |
| `number-of-reviewers` | Yes | The number of reviewers required. | 2 |
| `changed-files-path` | Yes | The path to the file containing a list of changed files. | NA |
| `important-files-path` | Yes | The path to the file containing a list of important files. | NA |
| Name | Required | Description | Default |
| ---------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `token` | Yes | A GitHub token with the [required permissions](#permissions) | NA |
| `number-of-reviewers` | Yes | The number of reviewers required. | 2 |
| `important-files-path` | Yes | The path to the file containing a list of important files. It should comply with [gitignore syntax](https://git-scm.com/docs/gitignore). | NA |

## Example usage

Expand All @@ -21,28 +20,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 2
permissions:
pull-requests: write
pull-requests: read
contents: read
checks: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Fetch all branches
run: git fetch --all

- name: Get changed files for the entire PR
run: |
# Get the changed files by comparing base and head branches
git diff --name-only origin/${{ github.event.pull_request.base.ref }}...origin/${{ github.event.pull_request.head.ref }} > .github/changed-files.txt
- name: Require two reviewers for important files
uses: dequelabs/axe-api-team-public/.github/actions/require-multiple-reviewers-v1@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
number-of-reviewers: 2
changed-files-path: .github/changed-files.txt
important-files-path: .github/important-files.txt
```
Expand Down
5 changes: 1 addition & 4 deletions .github/actions/require-multiple-reviewers-v1/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@ inputs:
description: 'The number of reviewers required.'
required: true
default: '2'
changed-files-path:
description: 'The path to the file containing a list of changed files.'
required: true
important-files-path:
description: 'The path to the file containing a list of important files.'
description: 'The path to the file containing a list of important files (gitignore syntax supported).'
required: true

runs:
Expand Down

This file was deleted.

Loading

0 comments on commit 3fa0fb6

Please sign in to comment.