Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/offensive-vk/auto-issue
Automated Issue Creator Action.
https://github.com/offensive-vk/auto-issue
automated github-actions issue issues workflow
Last synced: about 1 month ago
JSON representation
Automated Issue Creator Action.
- Host: GitHub
- URL: https://github.com/offensive-vk/auto-issue
- Owner: offensive-vk
- License: mit
- Created: 2024-09-03T17:26:52.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-11-08T12:18:54.000Z (about 2 months ago)
- Last Synced: 2024-11-08T12:37:47.797Z (about 2 months ago)
- Topics: automated, github-actions, issue, issues, workflow
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/auto-issue
- Size: 1.26 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# auto-issue
This GitHub Action allows you to automate the creation of issues in a repository. This supports more options like assigning users, adding labels, and integrating with workflows that may fail. Check the Actions tab for behind the scenes.
## Example Usage
```yml
steps:
- uses: actions/checkout@v4- name: Create an Issue
uses: offensive-vk/auto-issue@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
title: "Automated Issue by offensive-vk/auto-issue."
body: "This is a test issue created by [auto-issue](https://github.com/offensive-vk/auto-issue) action."
```## Inputs Configuration
Configure the inputs through the `with:` section of the Action. Below is a list of configurable options:
| Option | Default Value | Description |
|-----------|-------------------------------|-------------|
| github-token | `${{ github.token }}` | The GitHub token used to authenticate requests. Use `${{ github.token }}` or create a PAT and store it in secrets. |
| owner | `github.context.repo.owner` | The owner of the repository where the issue will be created. Inferred from the context. |
| repo | `github.context.repo.repo` | The repository name where the issue will be created. Inferred from the context. |
| title | `Automated Issue` | The title of the issue. |
| body | `This Issue was automated by github-actions.` | The body content of the issue. |
| labels | `automated` | A comma-separated list of labels to apply to the issue. |
| milestone | `null` | The milestone ID to associate the issue with. |
| assignees | `github.actor` | A comma-separated list of GitHub usernames to assign the issue to. |## Outputs
| Output | Description |
|----------|--------------------------------------------------------------|
| JSON | The full JSON response from the GitHub API. [See Response](https://docs.github.com/en/rest/issues/issues#create-an-issue) |
| URL | The URL of the created issue. |
| NUMBER | The issue number. |## Usage
> [!NOTE]
> This Action only supports `ubuntu-latest` runners.### Advanced Workflow
```yml
name: Dangerous Workflow
...jobs:
job-that-might-fail:
...create-issue-if-job-fails:
needs: job-that-might-fail
runs-on: ubuntu-latest
if: always() && needs.job-that-might-fail.result == 'failure'
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Create Issue
uses: offensive-vk/auto-issue@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
title: |
${{ github.workflow }} failed during ${{ github.event_name }}
assignees: ${{ github.actor }},${{ github.triggering_actor }}
labels: ci/cd
body: |
## Failure Report:
> [!IMPORTANT]
> Details on failed run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- Author: @${{ github.triggering_actor }}
- Branch: `${{ github.ref }}`
- Commit: ${{ github.sha }}
- Workflow Path: `${{ github.workflow_ref }}`
- [ ] **Task**: Review failed run, fix the issue(s), and re-run until successful.
> This issue was created automatically by GitHub Actions,
> through `offensive-vk/create-issue-action@v5` action
> **DO NOT** close this issue until resolved.
```### Using Outputs
```yml
...
steps:
- uses: actions/checkout@v4
- uses: offensive-vk/auto-issue@v7
id: new-issue
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
title: Simple Issue
body: 'This is a test issue created by [auto-issue](https://github.com/offensive-vk/auto-issue) action.'
- run: |
echo "${{ steps.new-issue.outputs.json }}" | jq
echo "${{ steps.new-issue.outputs.json }}" | jq .state
echo "${{ steps.new-issue.outputs.json }}" | jq .labels[].name
```***
© Vedansh 2020 - Present
Licensed under MIT
Thanks for visiting :)