I'm trying to use if !build.pull_request.draft to trigger builds only on open (non-draft) PRs and I found that the conditional may not be evaluating correctly. It appears that despite the state of the PR (tried it in open and in draft PR), if build.pull_request.draft is set, the steps will not run. if if !build.pull_request.draft is set, the steps will run but also regardless of whatever the PR's draft status is. Our ci.yaml is being parsed in properly and that the conditional is loaded correctly into the step.
Approximately how our ci.yaml looks
steps:
- label: STEP THAT WILL ALWAYS RUN
key: "test"
agents:
queue: "foo"
timeout_in_minutes: 30
command: |
<OUR COMMANDS>
if: "!build.pull_request.draft"
- label: STEP THAT WILL NEVER RUN
key: "test2"
agents:
queue: "foo"
timeout_in_minutes: 30
command: |
<OUR COMMANDS>
if: "build.pull_request.draft"
Hello!
I'm trying to use
if !build.pull_request.draft
to trigger builds only on open (non-draft) PRs and I found that the conditional may not be evaluating correctly. It appears that despite the state of the PR (tried it in open and in draft PR),if build.pull_request.draft
is set, the steps will not run. ifif !build.pull_request.draft
is set, the steps will run but also regardless of whatever the PR's draft status is. Ourci.yaml
is being parsed in properly and that the conditional is loaded correctly into the step.Approximately how our
ci.yaml
looks