AL-Go
AL-Go copied to clipboard
Conditions to trigger pull request builds
The setting fullBuildPatterns allows us to configure when a full build is triggered. As far as I understand this does not apply for pull request builds.
Is there anything available to cover the following scenario?
We want a pull request build to be only triggered if an al,... file is changed. Changing a markdown file should for example trigger not a pr build.
I found this but I guess something like this is not natively supported for now?
@dsaveyn Thank you for reaching out.
fullBuildPattern
is actually exclusively used for pull request builds: changes to any path in the fullBuildPattern
will trigger a full build. It means that all AL-Go projects will be built, regardless of whether they were changed in the PR or not.
Reading your scenario, it looks like you would want to set paths
in the PullRequestHandler.yaml (see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-including-paths).
E.g.
name: 'Pull Request Build'
on:
pull_request_target:
paths: ['*.al']
...
However, this is currently not supported by AL-Go. Even if you change the workflow YAML, next time you run "Update AL-Go System Files" the changes will be overwritten.
The link that you mention is about the trigger type. AL-Go supports both pull_request_target
or pull_request
triggers (setting is called pullRequestTrigger
). However, setting the trigger wouldn't solve your case. It is merely setting in what context the build would run.
Thank you for the information. Any future plans to support this?
No, not really.
But we will discuss if it's worth adding such functionality.