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

source integration: build-draft-pull-requests can not be altered until after build-pull-requests is enabled #3852

Open
gilzow opened this issue Mar 12, 2024 · 1 comment

Comments

@gilzow
Copy link
Collaborator

gilzow commented Mar 12, 2024

Where on docs.platform.sh should be changed?

https://docs.platform.sh/integrations/source/gitlab.html#2-enable-the-integration
https://docs.platform.sh/integrations/source/github.html#2-enable-the-integration

What exactly should be updated?

When interactively creating an integration, if you select false for build-pull-requests, you are not prompted for any remaining build-* parameters. Our system for some reason then sets build-draft-pull-requests to true. In terms of activities this isn't an issue as we aren't building any PRs. However, if you then later want to enable build-pull-requests and disable build-draft-pull-requests you are unable to:

❯ platform integration:update -p <projectid> --fetch-branches=true --build-pull-requests=true --build-draft-pull-requests=false <integrationid>

  [ConditionalFieldException]                    
  --build-draft-pull-requests is not applicable  

According to @akalipetis the parameter build-draft-pull-requests can not be altered at all unless build-pull-requests is enabled. This means that a user must perform two actions: one to set build-pull-requests to true and then a second to update build-draft-pull-requests to false.

Additional context

No response

@gilzow gilzow self-assigned this Mar 12, 2024
@gilzow
Copy link
Collaborator Author

gilzow commented Mar 12, 2024

Further conversation, it appears that Platform sets build-draft-pull-requests to true as a default if build-pull-requests is set to false. This can be particularly confusing if, as a user, you've set up your integration interactively (as I've described above), go back to view your integration details to find that build-draft-pull-requests is "enabled". Further, because of the logic described above, you can not disable (set to false) build-draft-pull-requests until after you re-enable build-pull-requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants