Skip to content

Actually fallback to default dict#281

Merged
alstr merged 1 commit intoalstr:masterfrom
soraxas:fix/unbounded-var
Feb 3, 2026
Merged

Actually fallback to default dict#281
alstr merged 1 commit intoalstr:masterfrom
soraxas:fix/unbounded-var

Conversation

@soraxas
Copy link
Copy Markdown
Contributor

@soraxas soraxas commented Jan 5, 2026

Actually fall back to an empty dict as per the print statement, to avoid UnboundLocalError

Run alstr/todo-to-issue-action@v5
  with:
    AUTO_ASSIGN: true
    CLOSE_ISSUES: true
    IDENTIFIERS: [
    { "name": "TODO", "labels": [] },
    { "name": "FIXME", "labels": ["fixme"] },
  ]
  
    INSERT_ISSUE_URLS: true
    REPO: Ant-Agent/task-engine
    COMMITS: null
    SHA: ...
    TOKEN: ***
    AUTO_P: true
    ACTOR: ...
    GITHUB_URL: https://api.github.com/
    GITHUB_SERVER_URL: https://github.com/
    ESCAPE: true
    NO_STANDARD: false
  env:
    MANUAL_COMMIT_REF: ...
    MANUAL_BASE_REF: ...
/usr/bin/docker run --name ghcrioalstrtodotoissueactionv5113_c4d21f --label badd31 --workdir /github/workspace --rm -e "MANUAL_COMMIT_REF" -e "MANUAL_BASE_REF" -e "INPUT_AUTO_ASSIGN" -e "INPUT_CLOSE_ISSUES" -e "INPUT_IDENTIFIERS" -e "INPUT_INSERT_ISSUE_URLS" -e "INPUT_REPO" -e "INPUT_BEFORE" -e "INPUT_COMMITS" -e "INPUT_DIFF_URL" -e "INPUT_SHA" -e "INPUT_TOKEN" -e "INPUT_AUTO_P" -e "INPUT_PROJECT" -e "INPUT_PROJECTS_SECRET" -e "INPUT_IGNORE" -e "INPUT_ACTOR" -e "INPUT_ISSUE_TEMPLATE" -e "INPUT_GITHUB_URL" -e "INPUT_GITHUB_SERVER_URL" -e "INPUT_ESCAPE" -e "INPUT_LANGUAGES" -e "INPUT_NO_STANDARD" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp":"/github/runner_temp" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/task-engine/task-engine":"/github/workspace" ghcr.io/alstr/todo-to-issue-action:v5.1.13
Traceback (most recent call last):
  File "/app/main.py", line 19, in <module>
    def process_diff(diff, client=Client(), insert_issue_urls=False, parser=TodoParser(), output=sys.stdout):
                                                                            ^^^^^^^^^^^^
  File "/app/TodoParser.py", line 46, in __init__
    if custom_identifiers_dict:
       ^^^^^^^^^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'custom_identifiers_dict' where it is not associated with a value
Invalid identifiers dict, ignoring.

Signed-off-by: Tin Lai <tin@tinyiu.com>
@alstr alstr merged commit d1f79f2 into alstr:master Feb 3, 2026
@alstr
Copy link
Copy Markdown
Owner

alstr commented Feb 3, 2026

Thanks for the submission, apologies for the delay!

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

Successfully merging this pull request may close these issues.

2 participants