Skip to content

Commit 35e304e

Browse files
authored
Merge pull request #17 from peter-evans/v2-beta
v2 beta
2 parents 5c3c3f6 + c957e0e commit 35e304e

18 files changed

+5953
-62
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Create Issue From File Example Command
2+
on:
3+
repository_dispatch:
4+
types: [ciff-example-command]
5+
jobs:
6+
createPullRequest:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Create Issue From File
11+
uses: ./
12+
with:
13+
token: ${{ secrets.GITHUB_TOKEN }}
14+
title: An example issue
15+
content-filepath: ./example-content/output.md
16+
labels: report, automated issue
17+
assignees: peter-evans
18+
project: Example Project
19+
project-column: To do
20+
- name: Add reaction
21+
uses: peter-evans/create-or-update-comment@v1
22+
with:
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
25+
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
26+
reaction-type: hooray

.github/workflows/push.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Slash Command Dispatch
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
slashCommandDispatch:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Slash Command Dispatch
10+
uses: peter-evans/slash-command-dispatch@v1
11+
with:
12+
token: ${{ secrets.REPO_ACCESS_TOKEN }}
13+
reaction-token: ${{ secrets.GITHUB_TOKEN }}
14+
commands: ciff-example
15+
permission: admin

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__pycache__
2+
node_modules
3+
.DS_Store

Dockerfile

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ If the file does not exist the action exits silently.
1414

1515
```yml
1616
- name: Create Issue From File
17-
uses: peter-evans/create-issue-from-file@v1
18-
env:
19-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20-
ISSUE_TITLE: An example issue
21-
ISSUE_CONTENT_FILEPATH: ./example-content/output.md
22-
ISSUE_LABELS: report, automated issue
23-
PROJECT_NAME: Example Project
24-
PROJECT_COLUMN_NAME: To do
17+
uses: peter-evans/create-issue-from-file@v2
18+
with:
19+
token: ${{ secrets.GITHUB_TOKEN }}
20+
title: An example issue
21+
content-filepath: ./example-content/output.md
22+
labels: report, automated issue
23+
project: Example Project
24+
project-column: To do
2525
```
2626
27-
#### Environment variables
27+
#### Inputs
2828
29-
- `ISSUE_TITLE` (**required**) - A title for the issue
30-
- `ISSUE_CONTENT_FILEPATH` (**required**) - The file path to the issue content
31-
- `ISSUE_LABELS` - A comma separated list of labels to apply
32-
- `ISSUE_ASSIGNEES` - A comma separated list of assignees (GitHub usernames)
33-
- `PROJECT_NAME` - The name of a project to add a project card to (Requires `PROJECT_COLUMN_NAME`)
34-
- `PROJECT_COLUMN_NAME` - The name of the project column to add the card to
29+
- `title` (**required**) - The title of the issue
30+
- `content-filepath` (**required**) - The file path to the issue content
31+
- `labels` - A comma separated list of labels
32+
- `assignees` - A comma separated list of assignees (GitHub usernames)
33+
- `project` - The name of the project for which a card should be created (Requires `project-column-name`)
34+
- `project-column` - The name of the project column under which a card should be created
3535

3636
## Actions that pair with this action
3737

action.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
name: 'Create Issue From File'
22
description: 'An action to create an issue using content from a file'
3+
inputs:
4+
token:
5+
description: 'The GitHub authentication token'
6+
required: true
7+
title:
8+
description: 'The title of the issue.'
9+
required: true
10+
content-filepath:
11+
description: 'The file path to the issue content.'
12+
labels:
13+
description: 'A comma separated list of labels.'
14+
assignees:
15+
description: 'A comma separated list of assignees (GitHub usernames).'
16+
project:
17+
description: 'The name of the project for which a card should be created.'
18+
project-column:
19+
description: 'The name of the project column under which a card should be created.'
320
runs:
4-
using: 'docker'
5-
image: 'Dockerfile'
21+
using: 'node12'
22+
main: 'dist/index.js'
623
branding:
724
icon: 'alert-circle'
825
color: 'orange'

0 commit comments

Comments
 (0)