Skip to content

fix: correct bot workflow YAML for draft PR handling#985

Closed
tech0priyanshu wants to merge 2 commits intohiero-ledger:mainfrom
tech0priyanshu:fix/bot-fix-draft-pr
Closed

fix: correct bot workflow YAML for draft PR handling#985
tech0priyanshu wants to merge 2 commits intohiero-ledger:mainfrom
tech0priyanshu:fix/bot-fix-draft-pr

Conversation

@tech0priyanshu
Copy link
Copy Markdown
Contributor

Description:

Related issue(s):

Fixes #981

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Copilot AI review requested due to automatic review settings December 7, 2025 01:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes bot workflows to prevent them from triggering on draft pull requests, addressing issue #981.

Key Changes

  • Added ready_for_review event trigger to all bot workflows to ensure they run when a draft PR is marked as ready
  • Added draft status checks (github.event.pull_request.draft == false) to workflow job conditions
  • Updated CHANGELOG to document the fix

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
CHANGELOG.md Documents the addition of draft PR checks to bot workflows
.github/workflows/pr-check-title.yml Adds ready_for_review trigger and draft check to title validation workflow
.github/workflows/pr-check-changelog.yml Adds ready_for_review trigger and draft check with workflow_dispatch handling
.github/workflows/merge-conflict-bot.yml Adds ready_for_review trigger and draft check to merge conflict detection
.github/workflows/bot-verified-commits.yml Adds ready_for_review trigger and draft check to commit verification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread CHANGELOG.md Outdated
Comment thread .github/workflows/pr-check-title.yml Outdated
Copy link
Copy Markdown
Contributor

@exploreriii exploreriii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tech0priyanshu
This is really good! Nice research. Small suggestions from copilot.

Then,
Could you verify if this works?

For example, on your origin fork can you

  1. create a pull request for your repository eg https://github.com/YOUR_NAME/hiero_sdk_python
  2. merge your fixes to your origin main

then:
3. create a draft pull request to your repository, with a PR that has unverified commits but is in draft mode (and passes all other checks). Ensure it does not post unverified commit bot.
4. Change status to ready to review. Ensure it posts verified commit bot.
5. Post screenshots and a link to check it works.

Repeat to create draft pull requests for merge conflict, changelog, title check

Thank you!

Comment thread CHANGELOG.md Outdated
@exploreriii
Copy link
Copy Markdown
Contributor

I am reviewing this currently but we have 4 concurrent bot PRs to review.
Request help to review @MonaaEid @tech0priyanshu @AntonioCeppellini @Adityarya11 if available

@tech0priyanshu tech0priyanshu marked this pull request as draft December 7, 2025 16:53
Signed-off-by: tech0priyanshu <priyanshuyadv101106@gmail.com>
Signed-off-by: tech0priyanshu <priyanshuyadv101106@gmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tech0priyanshu tech0priyanshu marked this pull request as ready for review December 7, 2025 19:33
@tech0priyanshu
Copy link
Copy Markdown
Contributor Author

The PR workflow is functioning correctly for both draft and ready-to-review states. It skips execution when the PR is in draft mode and runs normally once it’s marked as ready for review.

See the test results here: test result

@tech0priyanshu
Copy link
Copy Markdown
Contributor Author

@exploreriii please review

Copy link
Copy Markdown
Contributor

@exploreriii exploreriii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would like to sit on this PR for a couple of days

While advanced users on draft benefit from less spam

New users on draft could benefit from the bots

We do see new users benefit from the bots at some stage

my assumption is new users will start off at ready to review PR, they don't tend to open a draft one
However, if we then start marking 'changes requested' things to 'draft' that could change

hmm


- name: Harden the runner
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think the changelog check is a bot?
i think its just a workflow

currently, the rule in my head is - workflows - run on draft

but bots don't post

debatable

name: Title Check
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.base.repo.fork }}
if: ${{ !github.event.pull_request.base.repo.fork && (github.event_name == 'workflow_dispatch' || github.event.pull_request.draft == false) }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same with this i think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but we do have bot workflows and bot verified commits which i would argue should only run on ready for review

debatable

@tech0priyanshu tech0priyanshu marked this pull request as draft December 7, 2025 23:14
@exploreriii
Copy link
Copy Markdown
Contributor

@manishdait
If we do have a bot that auto switches 'request change' status review PRs to draft, does it make sense to only run the
quality-bots (merge conflict bot, verified commit bot, workflow bot..) only when the issue becomes 'Ready to review'?

Because we will have new starters that are now working from draft mode so will get no feedback until ready for review

On one hand, they can help a user progress faster in draft mode
but are spammy, when drafts are not correct

@manishdait
Copy link
Copy Markdown
Contributor

If we’re auto-moving PRs to draft when changes are requested. In that case, I’d actually prefer that only the GitHub workflows run in draft, and we disable the bots entirely for (merge conflict bot, verified commit bot, workflow bot)

This will avoids unnecessary spamming when they are working with their changes and The workflows will still surface actual build/test failures, which is enough guidance at the draft stage.

@exploreriii

This comment was marked as outdated.

@exploreriii
Copy link
Copy Markdown
Contributor

Let's say if bots only run on draft:

  1. PR created
  2. PR selected as ready for review
  3. Only workflows run
  4. Manually have to type out errors like "your commits are not verified", "see this changelog.md to improve it"
  5. Click Request above changes
  6. Change status to draft
  7. Bots now trigger: get the your commits are not verified bot, the changelog bot
  8. Complete PR again

The issue I see is:

  • manually typing feedback at the review stage
  • repeated feedback once changed to draft

Let's say if bots only run on ready to review and not on draft:

  1. PR created
  2. PR selected as ready for review
  3. Bots report
  4. Workflows report
  5. Requested changes based on reports
  6. Convert to draft
  7. User completes changes
  8. Ready to review
  9. Bots and workflows report

The issue I see is:

  • lots of spam right at the ready for review stage

Overall, not clear if there is a net benefit

@aceppaluni
Copy link
Copy Markdown
Contributor

aceppaluni commented Dec 16, 2025

@tech0priyanshu This is awesome work!

I reviewed the workflow changes and the implementation itself looks solid!
The use of ready_for_review triggers combined with pull_request.draft == false guards is consistent and correct, and the logic is easy to reason about.

I agree this makes sense for the “bot-style” workflows (verified commits, merge conflict bot), where avoiding noise during draft is beneficial.

One nuance worth calling out (already touched on in the thread) is that some of these are more workflows than bots and there may be value in still running those during draft for early feedback, especially for new contributors.

That said, from a technical perspective the changes look good to me. I think the remaining question is a product/maintainer decision on desired behavior.

Additionally,

For PR formatting and requirements please use the link below.
https://github.com/hiero-ledger/hiero-sdk-python/blob/main/docs/sdk_developers/training/workflow/11_submit_pull_request.md

If you have any questions please feel free to reach out to me, ( @aceppaluni ) or our amazing team! We are always happy to assist!

@exploreriii
Copy link
Copy Markdown
Contributor

yap you are correct @aceppaluni
We have a workflow that will auto convert change requested PRs to draft

then this is the debate - will we benefit from selecting when the bots run?
Not yet clear - sorry about that.

@github-actions
Copy link
Copy Markdown

Hello, this is the Office Hour Bot.

This is a reminder that the Hiero Python SDK Office Hours are scheduled in approximately 4 hours (14:00 UTC).

This session provides an opportunity to ask questions regarding this Pull Request or receive assistance from a maintainer.

Details:

Disclaimer: This is an automated reminder. Please verify the schedule here to be notified of any changes.

@github-actions
Copy link
Copy Markdown

Hi @tech0priyanshu,

This pull request has had no commit activity for 10 days. Are you still working on the issue? please push a commit to keep the PR active or it will be closed due to inactivity.
Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

@exploreriii
Copy link
Copy Markdown
Contributor

temporarily closing this PR while it is parked
we will follow up on this in the issue body itself after we have the auto draft bot working correctly

@tech0priyanshu tech0priyanshu deleted the fix/bot-fix-draft-pr branch December 28, 2025 16:24
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.

Some of our bots should not trigger when a PR is in draft

5 participants