Skip to content

Jira channel on 0.1.0 - #26

Closed
yashodhah wants to merge 9 commits into
humanlayer:mainfrom
yashodhah:jira-channel-on-0.1.0
Closed

yashodhah wants to merge 9 commits into
humanlayer:mainfrom
yashodhah:jira-channel-on-0.1.0

Conversation

@yashodhah

Copy link
Copy Markdown

No description provided.

yashodhah and others added 9 commits October 19, 2026 20:54
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Parse ADF (or plain string) comment bodies for bot mentions, nested
blocks included, and expose the text after the first mention. Route
comments that mention the bot to onMentioned, ignoring the bot's own
comments and plain comments; prepare the JiraIssue destination before
the callback and re-run the saved callback on retries.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Update and delete are reported unsupported and dropped from jiraSupportedOperations.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
v0.1.0 saves one callback per prepared invocation (`callback` name, no
`callbacks`/`callbackIndex`) and its ProviderOutputProcessor is not generic.
Prepare and rerun the single `onMentioned` callback as GitHubEventProcessor
does at the tag, and have the output half read JiraApi when it is built and
provide it per attempt, as GitHubDeliveryOutput does. JiraBot.make now
declares JiraApi as a build requirement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
JiraBot.make takes an optional `jiraApi` layer (default JiraApiLive over
Fetch), builds it in all three halves, supplies it to the handlers and the
output processor, and declares `build: ApiRequirements` and
`process: Exclude<R, JiraApi>` as GitHubBot does at v0.1.0. Also test that
a saved callback that is unknown, unconfigured or unbuildable fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Read a string comment body as wiki markup: [~accountid:<id>] counts as a
  mention and renders as @<id>; warn (format and comment id only) on a
  string or undecodable body.
- Event id is comment_created:<comment.id> from the signed body; the
  unsigned X-Atlassian-Webhook-Identifier header is ignored.
- Bound the webhook body at 1 MiB (413 from the routes).
- UTF-8-safe basic auth; JIRA_BASE_URL must be https.
- Tests: tampered body, signature-before-JSON order, missing header reason,
  >64-byte HMAC key, bot-authored ignore reason.
- Add files: ["src"] and a README (release:validate requires one).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…teway

The bot is an Atlassian service account. JiraApiLive now reads JIRA_CLOUD_ID
(validated as a UUID, since it is part of the request path) and JIRA_API_TOKEN,
and calls https://api.atlassian.com/ex/jira/<cloudId>/rest/api/3/... with
Authorization: Bearer <token>. JIRA_BASE_URL and JIRA_BOT_EMAIL are no longer
read. makeJiraApiLive takes an overridable gateway base for tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Save the triggering comment's author as an optional replyTo on the
JiraIssue destination at prepare time, and have the output processor
pass it to JiraApi.postComment as a structural mention. The posted ADF
body then starts with a mention node followed by the first block's
text. Markdown is still converted to plain text nodes only, so
mention-like text in user content never becomes a mention.

replyTo is optional, so destinations saved without it still decode and
jiraPresentationVersion stays 1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@yashodhah yashodhah closed this Oct 20, 2026
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants