Skip to content

Fix non-existent github.run_duration variable in workflow#100

Merged
izzortsi merged 2 commits intofeature/automated-semantic-analysisfrom
copilot/sub-pr-79-again
Nov 14, 2025
Merged

Fix non-existent github.run_duration variable in workflow#100
izzortsi merged 2 commits intofeature/automated-semantic-analysisfrom
copilot/sub-pr-79-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 14, 2025

The workflow referenced ${{ github.run_duration }}, which doesn't exist in GitHub Actions context and would output empty or error.

Changes

  • Add timestamp capture at job start using date +%s stored in START_TIME env var
  • Compute elapsed time in PR comment step: ELAPSED_TIME = END_TIME - START_TIME
  • Replace ${{ github.run_duration }} with computed ${ELAPSED_TIME}
- name: Record start time
  run: echo "START_TIME=$(date +%s)" >> $GITHUB_ENV

# ... later in workflow ...

- name: Add PR comment with details
  run: |
    END_TIME=$(date +%s)
    ELAPSED_TIME=$((END_TIME - START_TIME))
    
    gh pr comment ... --body "
    - **Processing Time**: ~${ELAPSED_TIME} seconds
    "

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: izzortsi <35747979+izzortsi@users.noreply.github.com>
Copilot AI changed the title [WIP] Update automated semantic analysis workflow implementation Fix non-existent github.run_duration variable in workflow Nov 14, 2025
Copilot AI requested a review from izzortsi November 14, 2025 00:58
@izzortsi izzortsi marked this pull request as ready for review November 14, 2025 00:59
@izzortsi izzortsi merged commit 4247e13 into feature/automated-semantic-analysis Nov 14, 2025
@izzortsi izzortsi deleted the copilot/sub-pr-79-again branch November 14, 2025 00:59
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