-
Notifications
You must be signed in to change notification settings - Fork 1
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 #3 from gitignore-in/improve
Improve and make it works
- Loading branch information
Showing
3 changed files
with
38 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ on: | |
- pull_request | ||
|
||
permissions: | ||
contents: read | ||
contents: write | ||
pull-requests: write | ||
issues: write | ||
|
||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ author: Yui KITSU | |
description: | | ||
Run gitignore-in command and if .gitignore is updated, generate pull request. | ||
branding: | ||
icon: folder-minus | ||
icon: file-minus | ||
color: white | ||
|
||
inputs: | ||
|
@@ -19,15 +19,29 @@ inputs: | |
Default: main | ||
required: false | ||
default: main | ||
outputs: {} | ||
outputs: | ||
pull-request-number: | ||
description: Pull request number. | ||
value: ${{ steps.create_pull_request.outputs.pull-request-number }} | ||
pull-request-url: | ||
description: Pull request URL. | ||
value: ${{ steps.create_pull_request.outputs.pull-request-url }} | ||
pull-request-operation: | ||
description: | | ||
The pull request operation performed by the action, `created`, `updated` or `closed`. | ||
value: ${{ steps.create_pull_request.outputs.pull-request-operation }} | ||
pull-request-head-sha: | ||
description: | | ||
The SHA of the head commit of the pull request. | ||
value: ${{ steps.create_pull_request.outputs.pull-request-head-sha }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
branch: ${{ inputs.base_branch }} | ||
ref: ${{ inputs.base_branch }} | ||
|
||
- uses: gitignore-in/[email protected] | ||
- run: | | ||
|
@@ -54,6 +68,7 @@ runs: | |
shell: bash | ||
|
||
- uses: peter-evans/create-pull-request@v5 | ||
id: create_pull_request | ||
with: | ||
branch: ${{ inputs.branch_name }} | ||
base: ${{ inputs.base_branch }} | ||
|