Skip to content

refactor(ci): read issue event data directly from the event payload - #597

Merged
Corina (corinagum) merged 1 commit into
mainfrom
cg/issue-analysis-workflow-env
Sep 16, 2026
Merged

Corina (corinagum) merged 1 commit into
mainfrom
cg/issue-analysis-workflow-env

Conversation

@corinagum

Copy link
Copy Markdown
Contributor

The Issue Analysis → Teams workflow had a Resolve issue details step that copied fields off the issue event into $GITHUB_OUTPUT so the two steps that actually use them could read them back as steps.issue.outputs.*.

That indirection isn't needed. Both consuming steps can read github.event.issue.* directly in their own env: block, so this drops the intermediate step and wires the values straight through.

Changes

  • Remove the Resolve issue details step.
  • Analyze issue with Copilot CLI takes ISSUE_NUMBER from github.event.issue.number in env: rather than assigning it inside the script.
  • Triage and notify Teams reads its six ISSUE_* values from github.event.issue.*.
  • Label joining moves from a jq call to the join() expression.

Notes

The analysis script's interface is unchanged. It still reads ISSUE_NUMBER, ISSUE_TITLE, ISSUE_AUTHOR, ISSUE_HTML_URL, ISSUE_LABELS and ISSUE_BODY from the environment and still splits labels on commas, and join(github.event.issue.labels.*.name, ',') produces the same comma-joined string jq did. Verified that the workflow still parses and that no steps.issue references remain.

The issue analysis workflow resolved issue fields in a dedicated step that wrote them to $GITHUB_OUTPUT, then read them back as step outputs in the two steps that consume them.
Each of those steps can read github.event.issue.* directly in its own env: block, so the intermediate step and the output roundtrip are no longer needed.
Label joining moves from jq to the join() expression, and the inputs the analysis script receives are unchanged.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: dea12e61-7e4a-46d7-af68-c3df58f18ce6
Copilot AI lite review requested due to automatic review settings September 16, 2026 19:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The workflow refactor preserves the existing interface with no unresolved issues.

Pull request overview

Refactors the issue-analysis workflow to read issue data directly from the GitHub event payload.

Changes:

  • Removes the intermediate issue-resolution step.
  • Passes issue metadata through step environment variables.
  • Replaces jq label formatting with join().
File summaries
File Description
.github/workflows/issue-analysis.yml Simplifies issue metadata propagation while preserving required script inputs.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@corinagum
Corina (corinagum) merged commit d977e22 into main Sep 16, 2026
5 checks passed
@corinagum
Corina (corinagum) deleted the cg/issue-analysis-workflow-env branch September 16, 2026 20:43
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.

3 participants