You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is branchId has type string, while ProjectApprovalRule requires array of numbers.
The solution given in #28 does not work due to the fact that branchId looks like: project.pathWithNamespace: project.defaultBranch which could not be converted to number.
Expected Behavior
The expected behavior is an ability to pass an output of getBranch to ProjectApprovalRule creation
Steps to reproduce
It is enough to call getBranch method and pass the output to ProjectApprovalRule
Output of pulumi about
❯ pulumi about
CLI
Version 3.53.1
Go Version go1.19.5
Go Compiler gc
Plugins
NAME VERSION
gitlab 4.9.0
nodejs unknown
Host
OS darwin
Version 13.1
Arch x86_64
This project is written in nodejs: executable='/usr/local/bin/node' version='v19.5.0'
Current Stack: prd
TYPE URN
pulumi:pulumi:Stack urn:pulumi:prd::gitlab-approval-rules::pulumi:pulumi:Stack::gitlab-approval-rules-prd
pulumi:providers:gitlab urn:pulumi:prd::gitlab-approval-rules::pulumi:providers:gitlab::default_4_9_0
gitlab:index/projectApprovalRule:ProjectApprovalRule urn:pulumi:prd::gitlab-approval-rules::gitlab:index/projectApprovalRule:ProjectApprovalRule::platform-346-platform-approvals
gitlab:index/projectApprovalRule:ProjectApprovalRule urn:pulumi:prd::gitlab-approval-rules::gitlab:index/projectApprovalRule:ProjectApprovalRule::rds-mysql-451-team-lead
gitlab:index/projectApprovalRule:ProjectApprovalRule urn:pulumi:prd::gitlab-approval-rules::gitlab:index/projectApprovalRule:ProjectApprovalRule::csmoney-239-tech-review
gitlab:index/projectApprovalRule:ProjectApprovalRule urn:pulumi:prd::gitlab-approval-rules::gitlab:index/projectApprovalRule:ProjectApprovalRule::csmoney-239-team-lead
Found no pending operations associated with prd
Backend
Name wrbbzBook.local
URL ${secretUrl}
User arseniyzorin
Organizations
Dependencies:
NAME VERSION
@pulumi/gitlab 4.9.0
@pulumi/pulumi 3.53.1
@types/node 16.18.11
Additional context
The GitLab API itself says that branch id has string type (URL-encoded name of the branch).
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered:
Nvm. Found out, what I am doing wrong.
There are protected branches and ordinary branches.
To get ids in numbers for protected branches, you have to call getProjectProtectedBranch and use its output
What happened?
I am trying to get default branch of the project with:
And after that to set it to projectApprovalRule:
The problem is
branchId
has type string, while ProjectApprovalRule requires array of numbers.The solution given in #28 does not work due to the fact that branchId looks like:
project.pathWithNamespace: project.defaultBranch
which could not be converted to number.Expected Behavior
The expected behavior is an ability to pass an output of
getBranch
toProjectApprovalRule
creationSteps to reproduce
It is enough to call
getBranch
method and pass the output toProjectApprovalRule
Output of
pulumi about
Additional context
The GitLab API itself says that branch id has string type (URL-encoded name of the branch).
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: