Upsert Issue

April 12, 2026 · View on GitHub

Create, update, reopen, or close a GitHub issue by title. Finds an existing issue with the same title and updates it, or creates a new one. Supports controlling the issue state (open / closed) to manage issue lifecycle — e.g., auto-closing when a report has no violations and reopening when violations recur.

Inputs

NameDescriptionRequiredDefault
titleTitle of the issue to create or update
bodyBody content of the issue
body-filePath to a file containing the body content (takes precedence over body)
labelsComma-separated list of labels to assign
openWhether the issue should be open (true) or closed (false)true
close-commentComment to post when closing the issue✅ Resolved — closing this issue.
repositoryTarget repository (owner/repo)${{ github.repository }}
github-tokenGitHub token with issues: write permission${{ github.token }}

Outputs

NameDescription
issue-numberThe number of the created or updated issue
issue-urlThe URL of the created or updated issue

Usage

Create or update an issue

steps:
  - uses: devantler-tech/actions/upsert-issue@main
    with:
      title: "[report] My Report"
      body-file: report.md

Close an issue when resolved

steps:
  - uses: devantler-tech/actions/upsert-issue@main
    with:
      title: "[report] My Report"
      body: "No violations found."
      open: "false"
      close-comment: "✅ All violations have been resolved."

Conditional open/close based on a previous step

steps:
  - id: report
    run: bun run report:my-report

  - uses: devantler-tech/actions/upsert-issue@main
    with:
      title: "[report] My Report"
      body-file: ${{ steps.report.outputs.report-path }}
      open: ${{ steps.report.outputs.has-violations }}