Merge ppa-dev-tools:add-ppa-credentials-command into ppa-dev-tools:main
Status: | Merged |
---|---|
Merge reported by: | Bryce Harrington |
Merged at revision: | 3fed215c7ab95c1753c3136e2d278aa1d195a1c4 |
Proposed branch: | ppa-dev-tools:add-ppa-credentials-command |
Merge into: | ppa-dev-tools:main |
Diff against target: |
397 lines (+185/-31) 6 files modified
ppa/constants.py (+2/-0) ppa/lp.py (+37/-16) scripts/ppa (+77/-10) tests/helpers.py (+12/-1) tests/test_lp.py (+4/-4) tests/test_scripts_ppa.py (+53/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Christian Ehrhardt (community) | Approve | ||
PpaDevTools Developers | Pending | ||
Canonical Server packageset reviewers | Pending | ||
Canonical Server Reporter | Pending | ||
Review via email: mp+450981@code.staging.launchpad.net |
Description of the change
This adds a 'ppa credentials' command that dumps your Launchpad creds to a file, that can be passed back in via LP_CREDENTIALS.
This enables a workaround for LP: #2022363, but may be handy for any case where either you can't log in via the website, or the automatically stored credentials aren't getting read for some reason.
This is not a complete solution for LP: #2022363, since the snap should be handling this automatically, but that will require separate investigation.
I imagine this command could benefit from some options, like specifying how to name the credentials file, and it might be nice to be able to refer to it via --credentials-
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
A few minor comments and suggestions to improve before merging as we might never look back to it otherwise.
The "allow argument to specify output file" seems so easy that it should IMHO be added.
I mean any snap magic that needs to be research, yes that is later.
But allowing where to store, that should be so easy that we should not hold back on that.
And TBH a global arg (not per subcommand, but generally available) to pass a filename.
"--use-credential" (if no arg given also using the default path) and "--use-credential foo" which would do not more but load that into the environment variable - that also seems rather close. Like <1h of work.
So again, unless you already released by time pressure, please consider adding that right away.