Skip to content

gh-aw job output #476

Closed as not planned
Closed as not planned

Description

@strawgate

Let's check if gh-aw populates a job output that includes any created issue numbers, check previous runs if we need to

Activity

  1. github-actions commented on Feb 28, 2026

    @github-actions
    Contributor
    2 related issues

    What is this? | From workflow: Duplicate Issue Detector

    Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  2. github-actions commented on Feb 28, 2026

    @github-actions
    Contributor

    TL;DR: gh-aw already emits machine-readable issue creation data, but not as a dedicated created_issue_numbers output; today the reliable signal is process_safe_outputs_temporary_id_map (plus the safe-output-items artifact), so I recommend consuming that instead of adding a new output unless we want an explicit convenience field.

    Recommendation

    Use needs.(job).outputs.process_safe_outputs_temporary_id_map as the job output contract for created issue IDs, and parse issue numbers from that map in downstream jobs. If we want a simpler contract, open a scoped enhancement to gh-aw to add a first-class created_issue_numbers output derived from the same map.

    Findings

    Verified code and runtime evidence
    • Workflow output wiring includes process_safe_outputs_temporary_id_map, not a dedicated created-issue output:
      • .github/workflows/gh-aw-product-manager-impersonator.lock.yml:1511
      • .github/workflows/gh-aw-product-manager-impersonator.lock.yml:1513
      • .github/workflows/gh-aw-product-manager-impersonator.lock.yml:1515
      • .github/workflows/gh-aw-product-manager-impersonator.lock.yml:1516
    • Same workflow config enables create_issue handler (so issue creation is expected):
      • .github/workflows/gh-aw-product-manager-impersonator.lock.yml:1541
    • Runtime logs from prior runs confirm created issues are registered and exported through temp-ID map, then exposed as job outputs:
      • Job 65123354810 (run 22481977490): logs include Created issue ...#449, Exported temporary ID map with 1 mapping(s), and Set output 'process_safe_outputs_temporary_id_map'.
      • Job 65238090480 (run 22517704877): logs include Registered temporary ID ... -> ...#475, Exported temporary ID map with 1 mapping(s), and Set output 'process_safe_outputs_temporary_id_map'.

    Verification

    What I checked
    • Searched compiled workflows for output keys and create_issue wiring.
    • Inspected previous job logs for safe-outputs execution and output publication.
    • Result: behavior is consistent with issue creation metadata being available via temporary-ID map, not a dedicated created-issue-number output.

    Detailed Action Plan

    If you want to act on this now
    1. In the consuming workflow, read needs.(safe_outputs_job).outputs.process_safe_outputs_temporary_id_map.
    2. Parse the map values to extract issue numbers (e.g., owner/repo#123 → 123).
    3. Use those parsed IDs for any follow-up automation (comments, linking, dedupe checks).
    4. Optional enhancement: add a compiler/runtime feature that also emits created_issue_numbers for easier downstream use, while keeping temporary_id_map for backward compatibility.

    Related Items

    Relevant history and artifacts
    Type Link Relevance
    Issue #476 Current triage request
    PR #360 Added issue-creating workflows (product-manager-impersonator, refactor-opportunist)
    PR #351 gh-aw upgrade touching output/env wiring context
    Workflow job https://github.com/elastic/ai-github-actions/actions/runs/22481977490/job/65123354810 Shows issue creation + exported temp-ID map
    Workflow job https://github.com/elastic/ai-github-actions/actions/runs/22517704877/job/65238090480 Shows temp-ID registration + exported map
    File .github/workflows/gh-aw-product-manager-impersonator.lock.yml:1511-1516 Published safe-outputs job outputs

    What is this? | From workflow: Issue Triage

    Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  3. strawgate commented on Feb 28, 2026

    @strawgate
    ContributorAuthor

    /ai maybe we should publish an action which extracts the value out of the job output and puts it in a normal spot that you can then use for triggering a fix workflow?

  4. github-actions commented on Feb 28, 2026

    @github-actions
    Contributor

    I agree we should put this in a simpler contract, but we likely don’t need a new trigger path to run fixes: issue creation is already the “normal spot.”

    Evidence:

    • Safe output map is already published as a job output: .github/workflows/gh-aw-product-manager-impersonator.lock.yml:1516 (process_safe_outputs_temporary_id_map).
    • Scheduled audit is already designed to stamp created issues with a stable title prefix/optional label: .github/workflows/gh-aw-scheduled-audit.md:30-37, :117.
    • Scheduled fix already selects targets from open issues via that prefix/label (no job-output parsing required): .github/workflows/gh-aw-scheduled-fix.md:30-38, :117-127.
    • If you want immediate fix execution, issue-fixer already triggers on issue creation (issues.opened): gh-agent-workflows/issue-fixer/example.yml:2-5.

    Practical recommendation:

    1. Use labels/title-prefix as the cross-workflow contract (already in place).
    2. For immediate chaining, run issue-fixer on issues.opened with an if: filter for your audit label/prefix.
    3. Optional enhancement: add a tiny helper action that converts process_safe_outputs_temporary_id_map into created_issue_numbers JSON/CSV outputs for convenience, but treat that as ergonomics rather than required for triggering fixes.

    What is this? | From workflow: Mention in Issue

    Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

  5. strawgate commented on Feb 28, 2026

    @strawgate
    ContributorAuthor

    /ai process_safe_outputs_temporary_id_map into created_issue_numbers is nice, the problem is that github-actions making an issue and labeling it won't trigger another workflow so unless it do funny business you need to trigger the fix in the same workflow and the easy way to do that I think is to encourage users to extract out the created issue and invoke a fix workflow as part of the same action run. Let's make a pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions