Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Whedon should respond to commands embedded in bigger comments #116

Open
jni opened this issue Sep 18, 2020 · 6 comments
Open

Whedon should respond to commands embedded in bigger comments #116

jni opened this issue Sep 18, 2020 · 6 comments

Comments

@jni
Copy link

jni commented Sep 18, 2020

See this comment:

openjournals/joss-reviews#2683 (comment)

I think it should be pretty straightforward to split incoming comments by newlines and fish out the command within a bigger comment?

@arfon arfon transferred this issue from openjournals/whedon Oct 19, 2020
@arfon
Copy link
Member

arfon commented Oct 19, 2020

👋 thanks for posting this @jni. Whedon currently very deliberately only listens to comments at the start of an issue (i.e. is anchored with the \A regex). This primarily to stop run-away robot behavior whereby Whedon starts responding to itself, or accidentally to others (this has happened in the past).

By anchoring to the start of the entire text, we can support interactions like this:

@whedon assign me as editor

:wave: @jni - I'll be editing this submission for you.

We could potentially add in some kind of additional safety checks to try and prevent runaway behavior and accidental input (e.g. when people simply say How do I get @whedon to do this thing?) but I've not seriously investigated this.

/ cc @xuanxu incase he has any thoughts.

@jni
Copy link
Author

jni commented Oct 20, 2020

@arfon my suggestion is that any command beginning with @whedon on its own line should be valid. See the comment I linked above and the one immediately after it.

I think that offers enough protection against the issues you mention?

@jni
Copy link
Author

jni commented Oct 20, 2020

Besides a runaway AI on GitHub would make for a great Joss Whedon screenplay, which is just so delightfully meta, how can you resist? =P

@xuanxu
Copy link
Member

xuanxu commented Oct 20, 2020

The main problem I see with making any command beginning with @whedon on its own line valid, is the code comments. For example, this comment would unleash hell: openjournals/joss-reviews#2695 (comment)
It would also allow for comments running many whedon commands, I'm not sure that's something we want.

We could warn editors and change the Whedon responses adding a space before each command, but I think many users use code comments to showcase Whedon commands as they don't expect the command to run that way.

We can probably modify current responses, document policies for editors and make regexes complex enough to manage dangerous behaviours, but is not a straightforward change.

@jni
Copy link
Author

jni commented Oct 20, 2020

Fair enough! Thanks for the detailed description @xuanxu! So I think at a minimum we would need to do some markdown parsing and remove code in code blocks.

I also don't understand why whedon can call whedon — that seems a priori like it should be disabled?

@xuanxu
Copy link
Member

xuanxu commented Oct 20, 2020

I also don't understand why whedon can call whedon — that seems a priori like it should be disabled?

So true, I guess it's not disabled because with the current whedon responses it's something that never happens, but if we change anything to parse embedded comments we should disable this for sure. It's a simple change, we can open an issue for it.

Anyway, we are focusing most of our current dev efforts in Buffy, JOSS' future editorial bot and those calls are disabled there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants