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

account for one repo --> multiple projects #4

Open
gilzow opened this issue Mar 3, 2023 · 0 comments
Open

account for one repo --> multiple projects #4

gilzow opened this issue Mar 3, 2023 · 0 comments
Assignees

Comments

@gilzow
Copy link
Collaborator

gilzow commented Mar 3, 2023

Just saw a scenario where a single repository had a github integration to multiple projects. If two web hooks are defined, the platformsh/gha-retrieve-projectid action will fail as it won't know which projectid is the "correct" one. But if one of the webhooks are removed, platform.sh will still report BOTH project's states in deploying the environment. In this scenario, this action fails when it retrieves the target_url property because it will receive two values, separated by a line break. When we then try to save this to the action output, an Unable to process file command 'output' successfully. error is thrown as the outputs dont support line breaks.

One option would be to require the project id in the inputs so that we can use it to figure out which webhook response is the "correct" one.

Example

gh api /repos/platformsh-templates/wordpress-composer/commits/enhance/reuse-workflows/statuses | jq -r 'map(select((.state | contains("success")) and (.target_url | contains("rbzgbkttdb7bw"))))'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant