Skip to content

Commit

Permalink
Include draft PRs in pr-check input (#1170)
Browse files Browse the repository at this point in the history
* build update

* Add draft flag to getPr function in get-pr.ts

* Fix logging issue in get-pr.ts and stale-branches.ts

* Add permissions for writing issues and contents in ci.yml

* Add pull request write permission in ci.yml

* Fix logging issue in get-pr.ts and stale-branches.ts

* build update

* Fix draft flag issue in getPr function

* Remove pull request write permission in ci.yml

* Fix logging issue in get-pr.ts and stale-branches.ts

* Remove pull request write permission in ci.yml

* Add PR check to stale-branches-test.yml workflow

* Add pull request write permission in stale-branches-test.yml workflow

* Remove pull request write permission in stale-branches-test.yml workflow

* Fix logging issue in get-pr.ts and stale-branches.ts

* get-pr now looks for incoming and outgoing prs
  • Loading branch information
crs-k authored Apr 11, 2024
1 parent b646407 commit ec3f698
Show file tree
Hide file tree
Showing 4 changed files with 279 additions and 49 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Inputs are defined in [`action.yml`](action.yml). None are required.:
| `compare-branches` | This compares each branch to the repo's default branch. <ul><li>When set to `info`, additional output describes if the current branch is ahead, behind, diverged, or identical to the default branch.<br>![image](https://user-images.githubusercontent.com/26232872/157590411-7c97806c-a509-4002-b7a5-a1e4a5da08eb.png)</li> <li>When set to `save`, this prevents branches from being deleted if they are ahead of or diverged from the default branch.</li> <li>When set to `off`, no additional calls are made.</li></ul> | off |
| `branches-filter-regex` | An optional Regex that will be used to filter branches from this action. | '' |
| `rate-limit` | If this is enabled, the action will stop if it exceeds 95% of the GitHub API rate limit. | true |
| `pr-check` | If this is enabled, the action will first check for active pull requests against the branch. If a branch has an active pr, it will not be ignored. | false |
| `pr-check` | If this is enabled, the action will first check for incoming/outgoing PRs associated with the branch. If a branch has an active pr, it will not be ignored. | false |

### Outputs
Outputs are defined in [`action.yml`](action.yml):
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Stale Branches
uses: crs-k/stale-branches@v4.1.0
uses: crs-k/stale-branches@v5.0.0
```
### With Inputs
```yaml
Expand All @@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Stale Branches
uses: crs-k/stale-branches@v4.1.0
uses: crs-k/stale-branches@v5.0.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
days-before-stale: 120
Expand Down
Loading

0 comments on commit ec3f698

Please sign in to comment.