Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Oct 7, 2025

Problem

The action was linking work items to pull requests but not providing clear visibility into which work items were linked. The TODO comments in the code highlighted this gap:

echo "Pull request linked to work item number: $WORKITEM_NUMBER"
# TODO: validate work item?
# TODO: add this as an ::info or to the job summary?

This made it difficult for users to quickly see what work items were associated with their PRs without digging through logs.

Solution

This PR adds visibility for work item linkages through two GitHub Actions features:

1. GitHub Actions Notices

Notice annotations now appear in the workflow run for each linked work item:

  • For work items found in commits: ::notice title=Work Item Linked::Work item AB#12345 (from commit abc123d) linked to pull request #42
  • For work items in PR title/body: ::notice title=Work Item Linked::Pull request linked to work item AB#12345

These notices appear in the workflow annotations UI, making them immediately visible when viewing the workflow run.

2. Job Summary

Work item linkages are added to $GITHUB_STEP_SUMMARY, creating a consolidated list on the job summary page:

  • - Work item AB#12345 (from commit abc123d) linked to pull request #42
  • - Pull request #42 linked to work item AB#12345

This provides a quick reference of all work items associated with the PR in one place.

Changes

  • action.yml: Added 4 lines for notices and job summaries, removed TODO comments
  • tests/action.test.sh: Added 8 new tests validating annotation and summary formats (33 tests total, up from 25)
  • README.md: Added "Action Output" section documenting the new visibility features
  • TESTING.md: Updated test counts and descriptions

Testing

✅ All 36 tests passing (33 bash + 3 JavaScript)

New tests verify:

  • Notice annotation format and content
  • Job summary format and content
  • Correct inclusion of work item numbers, commit SHAs, and PR numbers

Impact

Users will now have immediate visibility into work item linkages through:

  • Workflow run annotations that highlight linked work items
  • Job summary showing all work items associated with the PR
  • No changes to existing functionality or behavior

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dev.azure.com
    • Triggering command: node /home/REDACTED/work/azdo_commit_message_validator/azdo_commit_message_validator/node_modules/.bin/jest (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Add information on linkage to job summary or ::info</issue_title>
<issue_description>From the job, make it easier to see what work item(s) were linked to PR

  echo "Pull request linked to work item number: $WORKITEM_NUMBER"
  # TODO: validate work item?
  # TODO: add this as an ::info or to the job summary?</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #68

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Add information on linkage to job summary Add work item linkage information to job summary and notices Oct 7, 2025
Copilot finished work on behalf of joshjohanning October 7, 2025 16:53
@Copilot Copilot AI requested a review from joshjohanning October 7, 2025 16:53
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.

Add information on linkage to job summary or ::info

2 participants