|
| 1 | +# Update issue |
| 2 | + |
| 3 | +<!-- These docs are generated by a tool --> |
| 4 | + |
| 5 | +A composite action for updating an existing github issue. |
| 6 | +This action will update _all_ fields of the issue, and thus should be used |
| 7 | +sparingly. Consider using the `issues/add-*` or `issues/remove-*` series of |
| 8 | +steps to alter the issue in-place. |
| 9 | +This requires `issues: write` permissions in order to work correctly. |
| 10 | + |
| 11 | +## Inputs |
| 12 | + |
| 13 | +| Name | Description | Default | |
| 14 | +|------|-------------|---------| |
| 15 | +| `title` (*) | The title to use for the issue | _N/A_ | |
| 16 | +| `assignees` | A list of assignees to add, separated by newlines. | `""` | |
| 17 | +| `body` | The body text of the github issue | `""` | |
| 18 | +| `issue-number` | The issue number to comment on. If not specified, this will attempt to retrieve the issue number from the Github `context` variable. | `"0"` | |
| 19 | +| `labels` | A list of labels to add, separated by newlines. | `""` | |
| 20 | +| `owner` | The repository owner | `""` | |
| 21 | +| `repo` | The repository | `""` | |
| 22 | +| `retries` | The number of times to try retrying | `"3"` | |
| 23 | +| `retry-exempt-status-codes` | The retry exempt status codes | `"400,401,403,404,422"` | |
| 24 | + |
| 25 | +**Note:** _(*) marks required inputs_ |
| 26 | + |
| 27 | +## Outputs |
| 28 | + |
| 29 | +| Name | Description | |
| 30 | +|------|-------------| |
| 31 | +| `issue-number` | The number of the created issue | |
| 32 | +| `issue-url` | The HTTP URL of the newly created issue | |
| 33 | + |
| 34 | +## Example |
| 35 | + |
| 36 | +Here is a very basic example of how to use the `issues/update` composite action |
| 37 | +in a project (placeholders are used in place of real inputs): |
| 38 | + |
| 39 | +```yaml |
| 40 | +run: |
| 41 | + example-job: |
| 42 | + # ... |
| 43 | + steps: |
| 44 | + # ... |
| 45 | + - name: Update issue |
| 46 | + id: issues-update # only necessary if using this action's output(s) |
| 47 | + uses: bitwizeshift/actions-github/issues/update@v1 |
| 48 | + with: |
| 49 | + # Required inputs |
| 50 | + title: TITLE |
| 51 | + |
| 52 | + # Optional inputs |
| 53 | + assignees: ASSIGNEES |
| 54 | + body: BODY |
| 55 | + issue-number: ISSUE_NUMBER |
| 56 | + labels: LABELS |
| 57 | + owner: OWNER |
| 58 | + repo: REPO |
| 59 | + retries: RETRIES |
| 60 | + retry-exempt-status-codes: RETRY_EXEMPT_STATUS_CODES |
| 61 | + # ... |
| 62 | + - name: Uses "Update issue" Outputs |
| 63 | + uses: example-actions/use-issues-update@v3 # illustrative |
| 64 | + with: |
| 65 | + use-issue-number: ${{ steps.issues-update.outputs.issue-number }} |
| 66 | + use-issue-url: ${{ steps.issues-update.outputs.issue-url }} |
| 67 | +``` |
0 commit comments