A composite action for getting a github issue by its issue number.
This requires issues: write permissions in order to work correctly.
| Name | Description | Default |
|---|---|---|
github-token |
The default token to use for this Git operation. If unspecified, this will default to github.token. |
"${{ github.token }}" |
issue-number |
The issue number to comment on | "0" |
owner |
The repository owner. If unspecified, this will default to the owner of the current repository. | "" |
repo |
The name of the repository. If unspecified, this will default to the current repository. | "" |
retries |
The number of times to attempt to retry if this fails. | "0" |
retry-exempt-status-codes |
A list of error-codes that are exempt from being retried. | "400,401,403,404,422" |
| Name | Description |
|---|---|
assignees |
A JSON array of all the assignee logins for this issue. |
assignees-count |
The number of assignees to this issue. |
body |
The body description of the issue |
issue-api-url |
The API URL corresponding to this issue. |
issue-number |
The number of the issue that was retrieved. |
issue-url |
The browser URL corresponding to this issue. |
labels |
A JSON array of all the label names for this issue. |
labels-count |
The number of labels assigned to this issue. |
locked |
Whether this issue is currently locked |
state |
The state of the issue |
state-reason |
The reason for the state |
time-since-create |
The amount of time since the issue was created |
time-since-last-update |
The amount of time since the issue was last updated |
title |
The title of the created issue |
Here is a very basic example of how to use the issues/get composite action
in a project (placeholders are used in place of real inputs):
run:
example-job:
# ...
steps:
# ...
- name: Gets an issue
id: issues-get # only necessary if using this action's output(s)
uses: bitwizeshift/actions-github/issues/get@v1
with:
# Optional inputs
github-token: GITHUB_TOKEN
issue-number: ISSUE_NUMBER
owner: OWNER
repo: REPO
retries: RETRIES
retry-exempt-status-codes: RETRY_EXEMPT_STATUS_CODES
# ...
- name: Uses "Gets an issue" Outputs
uses: example-actions/use-issues-get@v3 # illustrative
with:
use-assignees: ${{ steps.issues-get.outputs.assignees }}
use-assignees-count: ${{ steps.issues-get.outputs.assignees-count }}
use-body: ${{ steps.issues-get.outputs.body }}
use-issue-api-url: ${{ steps.issues-get.outputs.issue-api-url }}
use-issue-number: ${{ steps.issues-get.outputs.issue-number }}
use-issue-url: ${{ steps.issues-get.outputs.issue-url }}
use-labels: ${{ steps.issues-get.outputs.labels }}
use-labels-count: ${{ steps.issues-get.outputs.labels-count }}
use-locked: ${{ steps.issues-get.outputs.locked }}
use-state: ${{ steps.issues-get.outputs.state }}
use-state-reason: ${{ steps.issues-get.outputs.state-reason }}
use-time-since-create: ${{ steps.issues-get.outputs.time-since-create }}
use-time-since-last-update: ${{ steps.issues-get.outputs.time-since-last-update }}
use-title: ${{ steps.issues-get.outputs.title }}