Skip to content

Fix jira-release-sync release-body handling#4

Merged
jonathangreen merged 1 commit intomainfrom
fix/jira-release-sync-release-body
Apr 30, 2026
Merged

Fix jira-release-sync release-body handling#4
jonathangreen merged 1 commit intomainfrom
fix/jira-release-sync-release-body

Conversation

@jonathangreen
Copy link
Copy Markdown
Member

@jonathangreen jonathangreen commented Apr 30, 2026

Summary

  • Read the release body from the release-body input instead of github.event.release.body, which silently ignored the input and broke any caller invoking the action outside a release: published trigger.
  • Add a release-body-file input as a fallback used only when release-body is empty; fail with a clear message if neither is provided.
  • Update the README to reflect the new either-or requirement.

The action was reading the release body from github.event.release.body,
ignoring the release-body input. Switch to the input, and add a
release-body-file fallback so callers without a published-release
context can still provide the body via a file path.
@jonathangreen jonathangreen merged commit cd5c9f2 into main Apr 30, 2026
3 checks passed
@jonathangreen jonathangreen deleted the fix/jira-release-sync-release-body branch April 30, 2026 18:32
jonathangreen added a commit that referenced this pull request May 1, 2026
## Description

Adds an end-to-end test workflow for the `jira-release-sync` action that
runs on every PR touching `jira-release-sync/**`.

The workflow:
- Starts a small Python `mock_jira.py` HTTP server that implements just
enough of the Jira REST API surface used by `action.yml` (create
version, list versions, link related work, update issue fixVersions) and
records every request to a JSONL log.
- Runs the action against the mock server.
- Asserts via `assert_calls.py` that the recorded requests match a
per-case expectations JSON file.

Two matrix cases are exercised:
- `with_keys` — release body contains `PP-*` references (including a
duplicate and a different-project key that must be ignored), expecting
fixVersions updates.
- `no_keys` — release body has no ticket references, expecting only the
version + related-work calls.

## Motivation and Context

The `jira-release-sync` action had no automated coverage, so regressions
like the recent `release-body` handling fix (#4) could only be caught
manually. This gives us a reproducible safety net for future changes to
the action.

## How Has This Been Tested?

- Mock server + assert script run locally against the action.
- The new workflow `test-jira-release-sync.yml` is the test plan — it
will run on this PR.

## Checklist

- [x] I have updated the documentation accordingly.
- [x] All new and existing tests passed.
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