Skip to content

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

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

ci: update status when action triggered by issue comment#347
richm merged 1 commit into
mainfrom
checks-update-pr-status

Conversation

@richm

@richm richm commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

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

  • Enhancements
    • Pull request checks now report clear commit statuses, including pending while running and the final result when complete.
    • Statuses identify individual test, lint, and validation jobs, including matrix scenarios where applicable.
    • Checks triggered by pull request comments now run against the latest pull request commit.
    • Unsupported test platforms are clearly marked as successfully skipped rather than appearing ambiguous.

@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: cf349247-6fbc-4f08-8d4b-57b1201b28f2

📥 Commits

Reviewing files that changed from the base of the PR and between ed5140d and c96c4d6.

📒 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 report pending and final commit statuses for issue-comment runs. They resolve pull request head SHAs and status contexts, check out the resolved commits, and handle matrix-specific status reporting.

Changes

Commit status lifecycle

Layer / File(s) Summary
Resolve status inputs and set pending state
.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 add statuses: write, derive pull request SHA and context values, set pending statuses, and check out the resolved commit. TFT derives these values per matrix entry and falls back to github.sha when needed.
Publish final workflow status
.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 job.status after issue-comment runs. QEMU/KVM reports skipped-platform success separately, and TFT uses per-matrix SHA and context outputs.

Suggested reviewers: spetrosi

Merge Risk: ⚪ Minimal · up to c96c4

The updated comment-triggered workflows consistently resolve pull request commits and publish pending and final statuses. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description Format ⚠️ Warning The pull request description does not follow .github/pull_request_template.md. It contains no Enhancement:, Feature:, Reason:, or Result: section. The change addresses an existing issue-comm… Update the description with the required bug-fix structure, for example: Cause: Issue-comment workflows do not automatically update the pull request status. Consequences: The pull request does not show the result of these workflows. `Fi…
✅ 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 update for issue-comment triggers.
Description check ✅ Passed The description clearly explains the reason and result of the changes and matches the pull request objectives. It does not use the required template headings and does not state whether an issue tracke…
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 clearly explains the reason and result of the changes and matches the pull request objectives. It does not use the required template headings and does not state whether an issue tracker ticket applies, but the core information is 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 pull request description does not follow .github/pull_request_template.md. It contains no Enhancement:, Feature:, Reason:, or Result: section. The change addresses an existing issue-comment status defect, but it also lacks the bug-fix sections Cause:, Consequences:, Fix:, and Result:. The Signed-off-by: line includes a name and email address.

Resolution

Update the description with the required bug-fix structure, for example: Cause: Issue-comment workflows do not automatically update the pull request status. Consequences: The pull request does not show the result of these workflows. Fix: Set pending and final commit statuses for the pull request head SHA when it is available. Result: Issue-comment workflows report their status on the pull request commit. Keep Signed-off-by: Rich Megginson &lt;rmeggins@redhat.com&gt; and add any optional ticket or Assisted-by: sections only if applicable.

  • 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 d9706e1 into main Sep 4, 2026
14 checks passed
@richm
richm deleted the checks-update-pr-status branch September 4, 2026 13:20
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