Move ChatOps alias matching from hubot to the API (server side)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.5k
- Forks
- 787
- PR merge metrics
- No merged PRs in 30d
Description
Something I have suggested many times in the past already.
Right now matching happens in two places - inside API and inside the hubot. This means we need to maintain same / similar code which is error prone (bugs, etc.) and time consuming.
In addition to that it means matching only really works with hubot right now and making it work with any other medium / bot requires duplicating work and effort (aka wasting time).
We should move all the functionality to the server side. This way client (hubot) will be dumb and much easier to maintain. It should simply send every line addressed to hubot to the API and API will perform and match and execute if a string matches - https://github.com/StackStorm/st2/pull/2895#discussion_r78954366
In addition to that, this will make it very easy for users to integrate StackStorm ChatOps with arbitrary bot / medium (simply send every line of text to StackStorm API - done!).
First part of that was already done in https://github.com/StackStorm/st2/pull/2895 and second part which is needed is described in https://github.com/StackStorm/st2/pull/2895#discussion_r78954366 (+ hubot changes of course).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading PR #2895 and the linked discussion, then compare the existing matching responsibilities in the API and hubot. The work is done when matching and execution are server-side, hubot forwards addressed lines without duplicating matching logic, and other bots can use the API directly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100