https://github.com/julien-deramond/update-issue-body
A GitHub action to update issue's body
https://github.com/julien-deramond/update-issue-body
github-action github-comments github-issues
Last synced: 7 months ago
JSON representation
A GitHub action to update issue's body
- Host: GitHub
- URL: https://github.com/julien-deramond/update-issue-body
- Owner: julien-deramond
- License: mit
- Created: 2023-05-17T16:03:20.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-22T19:23:35.000Z (about 1 year ago)
- Last Synced: 2025-02-28T13:24:15.293Z (8 months ago)
- Topics: github-action, github-comments, github-issues
- Language: TypeScript
- Homepage:
- Size: 273 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Update issue body
[](https://github.com/julien-deramond/update-issue-body/actions?query=workflow%3ACI)
[](https://github.com/marketplace/actions/update-issue-body)A GitHub action to update issue's body.
_This is heavily based on [peter-evans/create-or-update-comment](https://github.com/peter-evans/create-or-update-comment/)._
## Usage
### Replace issue body
```yaml
- name: Update Issue Body
uses: julien-deramond/update-issue-body@v1
with:
issue-number: ${{ github.event.issue.number }}
body: |
**Edit**: Some new content
edit-mode: replace
```### Append content to issue body
```yaml
- name: Append Issue Body
uses: julien-deramond/update-issue-body@v1
with:
issue-number: ${{ github.event.issue.number }}
body: |
**Edit**: Append some new content separated by a space
edit-mode: append
append-separator: space
```### Prepend content to issue body
```yaml
- name: Prepend Issue Body
uses: julien-deramond/update-issue-body@v1
with:
issue-number: ${{ github.event.issue.number }}
body: |
**Edit**: Prepend some new content separated by a space
edit-mode: prepend
prepend-separator: space
```### Action inputs
| Name | Description | Default |
| --- | --- | --- |
| `token` | `GITHUB_TOKEN` (`issues: write`) or a `repo` scoped [PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). | `GITHUB_TOKEN` |
| `repository` | The full name of the repository in which to update the issue body. | Current repository |
| `issue-number` | The number of the issue to be updated. | |
| `body` | The issue body. | |
| `edit-mode` | The mode when updating the issue body, `replace`, `append` or `prepend`. | `append` |
| `append-separator` | The separator to use when appending to an existing issue body. (`newline`, `space`, `none`) | `newline` |
| `prepend-separator` | The separator to use when prepending to an existing issue body. (`newline`, `space`, `none`) | `newline` |### Accessing issues in other repositories
You can update issue body in another repository by using a [PAT](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) instead of `GITHUB_TOKEN`.
The user associated with the PAT must have write access to the repository.## Sponsors
## License
[MIT](LICENSE)