Skip to content

ci: update status when action triggered by issue comment - #264

Closed
richm wants to merge 1 commit into
mainfrom
checks-update-pr-status
Closed

richm wants to merge 1 commit into
mainfrom
checks-update-pr-status

Conversation

@richm

@richm richm commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

issue comment triggers do not automatically update check
status in the PR, so use separate steps to update them,
similar to how the tft.yml workflow works. For issue
comment workflows, ensure that the head_sha is set early
in the workflow and the status is only updated if there
is a head_sha. Also create a variable for context so
it is created in one place and used in several places in
the workflow.

Summary by CodeRabbit

  • New Features
    • Added commit status reporting for issue-comment-triggered workflow runs.
    • Checks now show a pending status while running and a final status when complete.
    • Statuses identify the relevant workflow and test scenario for clearer results.
    • Workflow runs now use the pull request’s latest commit for validation.

@richm
richm requested a review from spetrosi as a code owner September 3, 2026 21:14
@richm richm self-assigned this Sep 3, 2026
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: ca9fe83f-8a55-4595-8dd3-1324c5e979a4

📥 Commits

Reviewing files that changed from the base of the PR and between 66c87a7 and bbd1a19.

📒 Files selected for processing (8)
  • .github/workflows/ansible-lint.yml
  • .github/workflows/ansible-managed-var-comment.yml
  • .github/workflows/ansible-test.yml
  • .github/workflows/codespell.yml
  • .github/workflows/markdownlint.yml
  • .github/workflows/qemu-kvm-integration-tests.yml
  • .github/workflows/test_converting_readme.yml
  • .github/workflows/woke.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The workflows now request permission to write commit statuses. For issue-comment runs, they resolve the pull request head SHA, set a pending status before validation, and set a final status from the job result afterward.

Changes

Commit status reporting

Layer / File(s) Summary
Status permissions and execution setup
.github/workflows/ansible-lint.yml, .github/workflows/ansible-managed-var-comment.yml, .github/workflows/ansible-test.yml, .github/workflows/codespell.yml, .github/workflows/markdownlint.yml, .github/workflows/qemu-kvm-integration-tests.yml, .github/workflows/test_converting_readme.yml, .github/workflows/woke.yml
The workflows add statuses: write, emit head SHA and context outputs, use the renamed outputs for checkout, and set pending statuses for issue-comment runs.
Final status reporting
.github/workflows/ansible-lint.yml, .github/workflows/ansible-managed-var-comment.yml, .github/workflows/ansible-test.yml, .github/workflows/codespell.yml, .github/workflows/markdownlint.yml, .github/workflows/qemu-kvm-integration-tests.yml, .github/workflows/test_converting_readme.yml, .github/workflows/woke.yml
The workflows report final commit statuses with job.status after validation. The QEMU workflow also updates platform-skipped status conditions.

Merge Risk: ⚪ Minimal · up to bbd1a

Issue-comment workflows now publish pending and final commit statuses for the resolved pull request head SHA. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description Format ⚠️ Warning The PR description does not follow the required bug-fix template. The change addresses a CI status bug, but the description has no Cause:, Consequences:, Fix:, or Result: sections. It does inc… Rewrite the PR description with labeled sections. For example: Cause: Issue-comment-triggered workflows do not automatically update the pull request check status. Consequences: The pull request does not show the current status of checks sta…
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format with the valid ci type and clearly describes the workflow status update for issue-comment triggers. ([github.com](https://github.com/linux-system-roles/…
Description check ✅ Passed The description is directly related to the changes and explains the reason, implementation, and intended result. It does not use the template headings, but it provides the required information in conc…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title follows Conventional Commits format with the valid ci type and clearly describes the workflow status update for issue-comment triggers. (github.com)

Full details: Description check

Explanation

The description is directly related to the changes and explains the reason, implementation, and intended result. It does not use the template headings, but it provides the required information in concise prose and does not indicate a Jira or BZ ticket.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (8 skipped: 8 unsupported.)

Full details: Description Format

Explanation

The PR description does not follow the required bug-fix template. The change addresses a CI status bug, but the description has no Cause:, Consequences:, Fix:, or Result: sections. It does include a valid Signed-off-by: line with an email address. The repository template confirms the required section structure.

Resolution

Rewrite the PR description with labeled sections. For example: Cause: Issue-comment-triggered workflows do not automatically update the pull request check status. Consequences: The pull request does not show the current status of checks started by an issue comment. Fix: Set the pull request head SHA and workflow context early, then set pending and final commit statuses only when a head SHA is available. Result: Issue-comment-triggered workflows update the pull request check status correctly. Signed-off-by: Rich Megginson <rmeggins@redhat.com>

  • Fix all pre-merge checks with AI

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@richm
richm force-pushed the checks-update-pr-status branch from f9fee3a to bbd1a19 Compare September 3, 2026 22:02
issue comment triggers do not automatically update check
status in the PR, so use separate steps to update them,
similar to how the tft.yml workflow works.  For issue
comment workflows, ensure that the head_sha is set early
in the workflow and the status is only updated if there
is a head_sha.  Also create a variable for context so
it is created in one place and used in several places in
the workflow.

Signed-off-by: Rich Megginson <rmeggins@redhat.com>
@richm

richm commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

[citest_ansible-lint]

@richm richm closed this Sep 3, 2026
@richm
richm deleted the checks-update-pr-status branch September 3, 2026 23: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.

1 participant