openSUSE / osc

The Command Line Interface to work with an Open Build Service

Home Page:http://openbuildservice.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wrong help text for osc token

olafhering opened this issue · comments

osc 0.182.1 has incorrect help text for osc token --help. It suggests that both prj and pkg are optional. But just running osc token --create in a working copy of a package does not create a token for that prj/pkg target. It will be a token without a "target". Maybe such tokens are useful, maybe such tokens are useless. Who knows.

Usage:
    osc token
    osc token --create [--operation <OPERATION>] [<PROJECT> <PACKAGE>]

I don't think it makes much sense to take the working copy into account...

https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.authorization.token#id-1.5.10.18.4

Most use cases in that doc do actually refer to a prj/pkg.

There is one case for a generic token. The description is not clear what that means in practice. Such generic token could be created outside of a working copy, like pushd ~ ; osc token --create ; popd.

There is one case for a generic token. The description is not clear what that means in practice

It just a scope. A generic token can be used to "operate" on any project/package you are allowed to run this token's "operation" on. A token scoped to a project/package will always use this project/package to run the token's "operation" on.

So, how do we proceed here?

I agree with @hennevogel, we shouldn't take the working copy into account.
We want to keep it simple and user should explicitly provide the scope.