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

Is there a way Assign users to projects via client? #273

Open
SkyBulk opened this issue Sep 12, 2024 · 0 comments
Open

Is there a way Assign users to projects via client? #273

SkyBulk opened this issue Sep 12, 2024 · 0 comments

Comments

@SkyBulk
Copy link

SkyBulk commented Sep 12, 2024

I saw you guys have a def assign_user_to_project(self, user_name, project_name, project_roles, limit=1000): . how can I access this function from the following?

from blackduck import Client
import logging
import os

logging.basicConfig(
    level=logging.INFO,
    format="[%(asctime)s] {%(module)s:%(lineno)d} %(levelname)s - %(message)s"
)

bd = Client(
    token=os.environ.get('blackduck_token'),
    base_url="https://your.blackduck.url",
    # verify=False  # TLS certificate verification
)

for project in bd.get_resource(name='projects'):
    print(project.get('name'))
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