Repository navigation
Support skipping draft pull requests - #16
Merged
Merged
Conversation
Add converted_to_draft to the accepted pull_request actions (GitHub deliveries for this action were rejected with 400), declare the pull_request.draft property, expose it as context.draft and in the job description. Add an example payload lib raising ConditionNotMet on draft pull requests, and document the pull_request:ready_for_review mapping needed to start the job when the draft is marked ready.
arnaudveron
marked this pull request as ready for review
October 20, 2026 20:47
This was referenced Oct 21, 2026
cgalibern
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Do not start the Rundeck QA runs for draft pull requests: start them only when the pull request is not a draft (opened ready, or marked ready for review).
Changes
swagger/github.yaml: accept theconverted_to_draftaction. Today GitHub deliveries for this action are rejected with HTTP 400 by the request validation. Declarepull_request.draft.context/github_pull_request.py: newcontext.draftproperty (Falsewhen absent), also added to the jobdescription.extra_lib_examples/job_payload/opensvc_agent_qa_run_pull_request_skip_draft.py: same logic as the productionopensvc_agent_qa_run_v3_pull_requestlib, plusConditionNotMeton draft pull requests.pull_request:ready_for_reviewmapping that is needed to start the job when the draft is marked ready.No behaviour change for existing payload libs: the skip only happens in libs that test
context.draft.Tested
The context and example lib were tested locally on simulated payloads:
pull/N, publish falsepull/N, publish falsemain, publish trueNot tested: a real signed GitHub delivery through connexion.
Production follow-up (osvcprd/svc/rundeck, after a new image)
cfg/rundeckwebhook/extra_lib/job_payload/opensvc_agent_qa_run_v3_pull_request.py(and the v2 lib if wanted): add thecontext.draftcheck.sec/rundeckwebhook/jobs-*-v3.json(10 files, om3): addpull_request:ready_for_review(copy of theopenedblock); same for the v2 files if wanted.gh_webhook_image, then restart thewebhooksubset.