Skip to content
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.

Commit

Permalink
How about this?
Browse files Browse the repository at this point in the history
kachick committed Jun 1, 2023

Verified

This commit was signed with the committer’s verified signature.
bakito Marc Brugger
1 parent dded2ad commit 9356dbd
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ on:

permissions:
contents: read
pull-requests: write

concurrency:
group: 'dprint'
@@ -27,3 +28,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./
with:
base-branch: 'main'
github-token: '${{ secrets.GITHUB_TOKEN }}'
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -37,17 +37,19 @@ jobs:
- uses: kachick/[email protected]
with:
base-branch: 'main'
github-token: "${{ secrets.GITHUB_TOKEN }}"
# auto-merge: false # default: true
```

## Parameters

All options should be specified with string. So true/false should be 'true'/'false'

| name | default | options | description |
| ----------- | ------- | --------------- | ------------------------------------------------------------------------------ |
| base-branch | (null) | e.g 'main' | The branch into which you want updating PR merged |
| auto-merge | 'true' | 'true', 'false' | The updating PR will be auto merged if no change exist even after `dprint fmt` |
| name | default | options | description |
| ------------ | ------- | --------------------------------- | ------------------------------------------------------------------------------ |
| base-branch | (null) | e.g 'main' | The branch into which you want updating PR merged |
| github-token | (null) | e.g "${{ secrets.GITHUB_TOKEN }}" | The token will be used to create PR |
| auto-merge | 'true' | 'true', 'false' | The updating PR will be auto merged if no change exist even after `dprint fmt` |

## Motivation

5 changes: 4 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,9 @@ inputs:
base-branch:
description: 'The branch into which you want updating PR merged'
required: true
github-token:
description: 'The token will be used to create PR'
required: true
auto-merge:
description: 'The updating PR will be auto merged if no change exist even after `dprint fmt`'
required: false
@@ -43,7 +46,7 @@ runs:
- name: Create PR
run: gh pr create --fill --base ${{ inputs.base-branch}}
env:
GH_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
GH_TOKEN: '${{ inputs.github-token }}'
shell: bash
# - name: Auto merge
# run: ...

0 comments on commit 9356dbd

Please sign in to comment.