Skip Pull Request check in draft mode
This PR adds a condition to "PullRequestHandler.yaml" that ensures pull requests in draft mode won't trigger the status check. This reduces unnecessary build workflows for feature branches. Additionally, the PR explicitly lists all types of the pull_request_target event. Listing the types isn't supposed to confirm each type as a valid reason to trigger the workflow, but rather to invite maintainers to judge which events can be ignored for this workflow.
Resolves #1051
https://github.com/microsoft/AL-Go/actions/runs/10140000167 Does the test fail because the templates are using microsoft/AL-Go@main as the template URL? Running the tests locally doesn't result in an error.
https://github.com/microsoft/AL-Go/actions/runs/10140000167 Does the test fail because the templates are using microsoft/AL-Go@main as the template URL? Running the tests locally doesn't result in an error.
The error is because the PullRequestHandler needs to be identical in the AppSource App template folder and in the Per Tenant Extension folder.
Your PR only contains changes to the PTE folder.
I think the PR makes sense. Being able to avoid builds while working on a PR in draft mode, can save a lot of minutes while you don't want them.
Big question is whether it should be possible to run builds on draft mode? with this PR, I guess it is always blocked?
I do agree there needs to be a way to allow for the pipeline to run in draft mode. We could either run the workflow partially and exit as soon as possible, or supplement Update-Workflow with the ability to append or remove the draft condition.
there needs to be a way to allow for the pipeline to run in draft mode. We could either run the workflow partially and exit as soon as possible, or supplement Update-Workflow with the ability to append or remove the draft condition.
We could also create a setting called runPullRequestBuildOnDraftPR and default it to false? Then most people wouldn't change that unless they really want this.
Closing this Pull Request for now since it's been stale for a while. In order to merge this PR, we would want this behavior to be configurable as mentioned in https://github.com/microsoft/AL-Go/pull/1132#issuecomment-2309879010
The feature suggestion #1051 is still in our backlog so the suggestion is not forgotten just because the PR will be closed now :)