generated from actions/javascript-action
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from github/config-issues
Debugging and Documentation
- Loading branch information
Showing
12 changed files
with
92 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,15 +11,32 @@ The workflow should be configured like: | |
> Where `vX.X.X` is the latest release version found on the releases page | ||
```yaml | ||
name: privileged-requester | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened, labeled, unlabeled] | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: read | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# checkout the repository | ||
- uses: actions/checkout@v4 | ||
|
||
# run privileged-requester | ||
- uses: github/[email protected] | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- uses: github/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
robotUserToken: ${{ secrets.REPO_GITHUB_TOKEN }} | ||
path: config/privileged-requester.yaml | ||
prCreator: ${{ github.event.pull_request.user.login }} | ||
prNumber: ${{ github.event.pull_request.number }} | ||
checkCommits: "true" | ||
checkDiff: "true" | ||
checkLabels: "true" | ||
``` | ||
See the example in [the workflow folder](.github/workflows/privileged-requester.yml) | ||
|
@@ -51,7 +68,7 @@ However, you can configure the Action to run with a different repo scoped token | |
|
||
Here are the configuration options for this Action: | ||
|
||
## Inputs 📥 | ||
### Inputs 📥 | ||
|
||
| Input | Required? | Default | Description | | ||
|-----------| --------- |---------------------------------------------| ----------- | | ||
|
@@ -64,8 +81,12 @@ Here are the configuration options for this Action: | |
| `checkDiff` | yes | `"true"` | An option to check that the PR diff only has a removal diff, with no additions | | ||
| `checkLabels` | yes | `"true"` | An option to check that the labels on the PR match those defined in the privileged requester config | | ||
|
||
## Outputs 📤 | ||
### Outputs 📤 | ||
|
||
| Output | Description | | ||
| ------ | ----------- | | ||
| `approved` | The string `"true"` if the privileged-requester approved the pull request | | ||
|
||
## First Time Setup | ||
|
||
It should be noted that this Action looks at the `default` branch for its configuration file. This means that if you add this Action through a pull request, it will look at the default branch and _fail_ because it cannot find the config file that has not landed on `main` / `master` yet. After merging the pull request that adds this Action to your repository, it should work as expected. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.