Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/ciff-example-command.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Create Issue From File Example Command
on:
repository_dispatch:
types: [ciff-example-command]
jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Issue From File
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: An example issue
content-filepath: ./example-content/output.md
labels: report, automated issue
assignees: peter-evans
project: Example Project
project-column: To do
- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray
20 changes: 0 additions & 20 deletions .github/workflows/push.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/slash-command-dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Slash Command Dispatch
on:
issue_comment:
types: [created]
jobs:
slashCommandDispatch:
runs-on: ubuntu-latest
steps:
- name: Slash Command Dispatch
uses: peter-evans/slash-command-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
reaction-token: ${{ secrets.GITHUB_TOKEN }}
commands: ciff-example
permission: admin
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__pycache__
node_modules
.DS_Store
18 changes: 0 additions & 18 deletions Dockerfile

This file was deleted.

30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ If the file does not exist the action exits silently.

```yml
- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_TITLE: An example issue
ISSUE_CONTENT_FILEPATH: ./example-content/output.md
ISSUE_LABELS: report, automated issue
PROJECT_NAME: Example Project
PROJECT_COLUMN_NAME: To do
uses: peter-evans/create-issue-from-file@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: An example issue
content-filepath: ./example-content/output.md
labels: report, automated issue
project: Example Project
project-column: To do
```

#### Environment variables
#### Inputs

- `ISSUE_TITLE` (**required**) - A title for the issue
- `ISSUE_CONTENT_FILEPATH` (**required**) - The file path to the issue content
- `ISSUE_LABELS` - A comma separated list of labels to apply
- `ISSUE_ASSIGNEES` - A comma separated list of assignees (GitHub usernames)
- `PROJECT_NAME` - The name of a project to add a project card to (Requires `PROJECT_COLUMN_NAME`)
- `PROJECT_COLUMN_NAME` - The name of the project column to add the card to
- `title` (**required**) - The title of the issue
- `content-filepath` (**required**) - The file path to the issue content
- `labels` - A comma separated list of labels
- `assignees` - A comma separated list of assignees (GitHub usernames)
- `project` - The name of the project for which a card should be created (Requires `project-column-name`)
- `project-column` - The name of the project column under which a card should be created

## Actions that pair with this action

Expand Down
21 changes: 19 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
name: 'Create Issue From File'
description: 'An action to create an issue using content from a file'
inputs:
token:
description: 'The GitHub authentication token'
required: true
title:
description: 'The title of the issue.'
required: true
content-filepath:
description: 'The file path to the issue content.'
labels:
description: 'A comma separated list of labels.'
assignees:
description: 'A comma separated list of assignees (GitHub usernames).'
project:
description: 'The name of the project for which a card should be created.'
project-column:
description: 'The name of the project column under which a card should be created.'
runs:
using: 'docker'
image: 'Dockerfile'
using: 'node12'
main: 'dist/index.js'
branding:
icon: 'alert-circle'
color: 'orange'
Loading