Support project API keys with auto-detection of org/project#40
Open
Support project API keys with auto-detection of org/project#40
Conversation
Project API keys are base64-encoded strings containing org/project/key. When detected, org and project slugs are extracted automatically, simplifying initialization. Legacy keys continue to work but emit a deprecation warning advising users to switch to project keys. - Add _parse_token() utility for base64 project key detection - Update _init() to decode project keys and extract org/project - Update Config.from_dict() to extract org/project for display/validation - Update CLI configure command to prompt for API key first and skip org/project prompts when a project key is detected - Add comprehensive tests for project key support
Celery stores the task result before firing the task_success signal. This means result.get() can return before the success handler runs, causing the mock context to exit and the second update_task_safe call to hit the real function instead of the mock. Add _wait_for_mock_calls() to poll until the expected call count is reached before exiting the mock context.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
org/project/keystrings) that auto-detect organization and project slugs from the token itselfDeprecationWarningadvising users to switch to project keysconfigurecommand now prompts for API key first and skips org/project prompts when a project key is detectedTest plan
test_project_key.pycovers_parse_tokenwith valid/invalid inputs,init()with project and legacy keys,Config.from_dict()with project keys, and CLI configure flowinit(token=base64.b64encode(b"org/project/key").decode())extracts org/projectinit("org", "project", "legacy-token")emits deprecation warningtaskbadger configurewith both key types🤖 Generated with Claude Code