Skip to content

feat: Update publish issue body when re-running GitHub Action#740

Merged
BYK merged 3 commits intomasterfrom
feat/update-publish-issue-body
Feb 5, 2026
Merged

feat: Update publish issue body when re-running GitHub Action#740
BYK merged 3 commits intomasterfrom
feat/update-publish-issue-body

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 4, 2026

Summary

  • Updates existing publish request issue instead of skipping when re-running the GitHub Action
  • Preserves checked state of targets (already-published or user-skipped) when updating
  • Refreshes all other content: requester, merge target, links, changelog, and target list

Motivation

When running the release action multiple times for the same version (e.g., after fixing CI issues or updating changelog), the publish request issue would remain stale. Now the issue body reflects the latest state while preserving user decisions about which targets to skip.

Behavior

Scenario Before After
Re-run with same targets Skip, stale body Update body, preserve checked states
Re-run with new targets Skip, missing targets Update body, new targets unchecked
Re-run with removed targets Skip, invalid targets Update body, removed targets gone
First run Create issue Create issue (unchanged)
Cursor Bugbot reviewed your changes and found no issues for commit b48b970

Previously, when a publish request issue already existed for the same
version, the action would skip issue creation entirely. This was
problematic when the changelog or targets changed between runs.

Now the action updates the existing issue's body with fresh content
while preserving the checked state of targets (which indicates
already-published or user-skipped targets).
@BYK BYK marked this pull request as ready for review February 4, 2026 23:37
Copy link
Member Author

@BYK BYK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re: Regex captures only first word of target names

This is a false positive. Target IDs are single-word identifiers by design - they're generated in src/targets/base.ts:29-33 as either {name} (e.g., github, npm, pypi) or {name}[{id}] (e.g., npm[registry], crates[custom-id]). They never contain spaces, so \S+ correctly captures the entire target name.

Prevents false positives if the changelog contains markdown checkboxes
that could be mistaken for target checkboxes.
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

gh issue list returns issues sorted by creation date (most recent first),
so we use jq's 'first' to handle the theoretical case of duplicate titles.
@BYK BYK merged commit 817a459 into master Feb 5, 2026
18 checks passed
@BYK BYK deleted the feat/update-publish-issue-body branch February 5, 2026 00:20
BYK added a commit that referenced this pull request Feb 6, 2026
)

## Summary

Fixes release workflow failure when the GitHub App token doesn't have
permission to update issues in the publish repo.

## Problem

The release workflow failed with:
```
failed to update getsentry/publish#7083: GraphQL: Resource not accessible by integration (updateIssue)
```

The `sentry-release-bot` GitHub App can create issues in
`getsentry/publish` but cannot update them.

## Solution

Handle the permission error gracefully:
- Try to update the existing issue
- If it fails (permission denied), emit a warning and continue with the
existing issue URL
- The workflow no longer fails due to this permission issue

## Related

- Failed run:
https://github.com/getsentry/craft/actions/runs/21760927528/job/62784167482
- Feature that introduced this: #740
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant