Skip to content

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

Merged
richm merged 1 commit into
mainfrom
checks-update-pr-status
Sep 4, 2026
Merged

richm merged 1 commit into
mainfrom
checks-update-pr-status

Conversation

@richm

@richm richm commented Sep 4, 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.

Create a variable for context so it is created in one place and used in several
places in the workflow.

Ensure that the first steps in the workflow are to get the head_sha and set the
status to In Progress.

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

Summary by CodeRabbit

  • New Features
    • Added commit-status reporting for comment-triggered validation and test workflows.
    • Checks now report a pending status before running and a final status when complete.
    • Statuses are associated with the relevant pull request commit and workflow context.
  • Bug Fixes
    • Corrected concurrency handling and commit selection when a prepared pull request head is unavailable.
    • Improved platform-specific status handling for integration tests.

@richm
richm requested a review from Jakuje as a code owner September 4, 2026 00:20
@richm richm self-assigned this Sep 4, 2026
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.

Create a variable for context so it is created in one place and used in several
places in the workflow.

Ensure that the first steps in the workflow are to get the head_sha and set the
status to In Progress.

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

coderabbitai Bot commented Sep 4, 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: 018a133a-23a1-47bb-8dc2-09dcea8d74d2

📥 Commits

Reviewing files that changed from the base of the PR and between c2bd017 and e9579ca.

📒 Files selected for processing (10)
  • .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/shellcheck.yml
  • .github/workflows/test_converting_readme.yml
  • .github/workflows/tft.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 resolve pull request head commits, set pending commit statuses before execution, and report final job statuses after execution. Matrix workflows reuse shared status contexts for platform-specific results.

Changes

Commit status reporting

Layer / File(s) Summary
Status permissions and context 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/shellcheck.yml, .github/workflows/test_converting_readme.yml, .github/workflows/woke.yml
The workflows request statuses: write, resolve pull request head SHAs with status contexts, set pending statuses, and check out the resolved commits.
Matrix status context reuse
.github/workflows/qemu-kvm-integration-tests.yml, .github/workflows/tft.yml
The matrix workflows expose shared head SHA and matrix-specific context outputs. TFT also adds a SHA fallback and corrects the concurrency comment.
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/shellcheck.yml, .github/workflows/test_converting_readme.yml, .github/workflows/tft.yml, .github/workflows/woke.yml
The workflows publish final job statuses for issue-comment-triggered runs. QEMU/KVM retains conditional success reporting for skipped platforms, and TFT uses the shared status outputs.

Suggested reviewers: spetrosi

Merge Risk: 🟡 Moderate · up to e9579

TFT status updates may be attached to the merge commit instead of the pull request head, causing the pull request to show inaccurate or missing commit-status results. Resolve the SHA selection before merging.

🚥 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 template. The repository template contains Enhancement:, Reason:, and Result: sections, and the description contains none of these labels. If this… Update the PR description to use the bug-fix template: add Cause:, Consequences:, Fix:, and Result: sections with relevant content, and retain Signed-off-by: Rich Megginson <rmeggins@redhat.com>. Alternatively, use the enhancement…
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format with the valid type ci and accurately describes the workflow status updates for issue-comment triggers.
Description check ✅ Passed The description explains the reason, implementation approach, status behavior, head SHA handling, shared context, and workflow ordering. It does not use the template headings, but it provides the requ…
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: Description check

Explanation

The description explains the reason, implementation approach, status behavior, head SHA handling, shared context, and workflow ordering. It does not use the template headings, but it provides the required information and is mostly complete.

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. (10 skipped: 10 unsupported.)

Full details: Description Format

Explanation

The PR description does not follow the required template. The repository template contains Enhancement:, Reason:, and Result: sections, and the description contains none of these labels. If this change is treated as a bug fix, it also lacks Cause:, Consequences:, Fix:, and Result:. It contains the required Signed-off-by: line with a name and email address.

Resolution

Update the PR description to use the bug-fix template: add Cause:, Consequences:, Fix:, and Result: sections with relevant content, and retain Signed-off-by: Rich Megginson &lt;rmeggins@redhat.com&gt;. Alternatively, use the enhancement template with Enhancement:, Reason:, and Result: sections.

  • 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 merged commit 32a0423 into main Sep 4, 2026
36 checks passed
@richm
richm deleted the checks-update-pr-status branch September 4, 2026 13:15
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