Skip to content

Commit

Permalink
Merge pull request #32 from abirismyname/dev
Browse files Browse the repository at this point in the history
Adding new body-filepath option
  • Loading branch information
abirismyname authored Oct 11, 2022
2 parents b618610 + d7025f7 commit 7436176
Show file tree
Hide file tree
Showing 9 changed files with 3,074 additions and 12,572 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,14 @@ jobs:
Let's Discuss!
repository-id: 'R_kgDOG-yfvw'
category-id: 'DIC_kwDOG-yfv84CRQpR'

- name: Generate new discussion using file
id: create-discussion-with-file
uses: abirismyname/[email protected]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: "New Discussion ${{ env.DATE }} in General"
body-filepath: 'zen.txt'
repository-id: 'R_kgDOG-yfvw'
category-id: 'DIC_kwDOG-yfv84CRQpR'
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
commit_message: Add dist/index.js
file_pattern: dist/*.js
tagging_message: 'v1.0.1'
tagging_message: 'v1.1.0'
push_options: '--force'
- uses: actions/upload-artifact@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ build/Release

# Dependency directories
./node_modules/
/node_modules
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ The following inputs are _required_:
- `title`: The title of the discussion
- `body`: The body of the discussion
- `body-filepath`: The path to a file containing the body of the new discussion (takes precedence over `body`).
- `repository-id`: The ID of the repository for the new discussion
- `category-id`: The ID of the category for the new discussion

Expand Down
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ inputs:
body:
description: |
The body of the new discussion.
required: true
required: false
body-filepath:
description: |
The path to a file containing the body of the new discussion (takes precedence over body).
required: false
repository-id:
description: |
The ID of a repository in which to create the discussion.
Expand All @@ -23,7 +27,7 @@ outputs:
discussion-url:
description: URL of the created discussion
runs:
using: node12
using: node16
main: dist/index.js
branding:
icon: message-circle
Expand Down
Loading

0 comments on commit 7436176

Please sign in to comment.