Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditions to trigger pull request builds #982

Open
dsaveyn opened this issue Mar 14, 2024 · 3 comments
Open

Conditions to trigger pull request builds #982

dsaveyn opened this issue Mar 14, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@dsaveyn
Copy link

dsaveyn commented Mar 14, 2024

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?

@mazhelez
Copy link
Collaborator

@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.

@dsaveyn
Copy link
Author

dsaveyn commented Mar 15, 2024

Thank you for the information. Any future plans to support this?

@mazhelez mazhelez added the enhancement New feature or request label Mar 18, 2024
@mazhelez
Copy link
Collaborator

No, not really.

But we will discuss if it's worth adding such functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants