Skip to content

action alias parser, URL interpreted as key value pair #3882

Open
@reisingerf

Description

@reisingerf

When an alias ends with a string that contains a = character (like an URL), this string is interpreted as key value pair, even it's not meant to be one. Wrapping the string in brackets or quotes does not change the behaviour.
Example:
In the alias definition:

formats:
    - "get status( from)? {{url='http://localhost:8080/api/1.0/list?state=ready'}}"

Chatops command:

!get status from 'http://otherhost:8080/api/1.0/list?state=ready'

Parsing result: {'url': 'http://localhost:8080/api/1.0/list?state=ready', "'http://otherhost:8080/api/1.0/list?state": "ready'"}

If the format is changed to:

formats:
    - "get status( from)? {{url='http://localhost:8080/api/1.0/list?state=ready'}} now"

Then the key value pair detection is skipped and the parsing result is as expected:
{'url': 'http://otherhost:8080/api/1.0/list?state=ready'}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions