Open patcon opened 6 years ago
Hey, leaving an example of how this could hypothetically work. Check it out! (Also, feel free to :+1: for FULL DEMO EFFECT :slightly_smiling_face: )
There is now a demo in the comments below!!! :tada: :taco: :tada:
:heart: I feel inspired by the Loomio collaboration tool [?] in relation to its settings for shared editing of thread "context" :mag: Loomio is built by people with experience in real-world facilitation practices, and the Occupy movement.
This is a really neat idea - I don't know how I'd use it in a real world project, but I'm sure there are others who do.
From a technical standpoint, fun fact: GitHub Flavored Markdown doesn't strip HTML comments, so you can use those as "fences" to cordon off areas of an existing comment. Example:
# Summary
<!-- UPDATE ME -->
Hi
Hello
Whats up
<!-- END UPDATE ME -->
Then using RegEx, you can capture that area:
const start = '<!-- UPDATE ME -->'
const end = '<!-- END UPDATE ME -->'
const reg = new RegExp(`${start}\n([\s\S]+)${end}`)
Or you could use Handlebars, which Probot already has as a dependency.
I do this in ci-reporter to update existing PR comments, feel free to dig around there if you're looking for a code example.
After typing all that ☝️ I realize that you already have a working demo of sorts I think? In any case, hope that was handy 😄
Thanks for the vote of confidence. Made me realize perhaps this could be more explicit:
ASIDE: @JasonEtco you don't have Twitter, so I don't know how to internet-yell at you, but -- seeing that you're in Toronto -- I just wanted to cordially invite you to a civic hacknight, should you ever feel inclined -- every Tues at 6:30pm :) We get maybe 60-80 designers, non-profit, techies, public servants, and generally just engaged ppl. Location this month is Secret Location (a honest-to-goodness real company name) who do VR/AR media: https://www.meetup.com/Civic-Tech-Toronto/events/nljtlpyxgbnb/
Do you have a best mode of comms outside GitHub? I'm @patconnolly, but our Slack also has a #public-lobby
channel bridged to Gitter that I just set up, if you'd prefer to use that! (Shhhh sneak peak, not "official" yet.)
(Disclaimer: I am one of the rag-tag group of co-organizers at Civic Tech Toronto, the crew who runs them :slightly_smiling_face: )
Haha @patcon I do have Twitter, was going to invite you to NodeschoolTO some time!
The ability to add a Summary section to the bottom should be possible even when OP didn't anticipate the need at the issue-level.
Totally - I think a simple check to see if that update-able block exists, and then adding it if it doesn't, would do the trick.
There'd also need to be some kind of abuse-prevention system. You mention reactions as being a way of moderating that - one day when Reaction webhook events exist that'll be viable. In the meantime, some other bad ideas:
Interesting on the alternative tactics... I'll think on that :)
What about where it's one step behind... like for each comment created, it checks for the reaction emoji? Assuming someone else says something eventually, then the +1 will be "noticed" and acted on
A little inelegant, but I'd really prefer the reaction approach
Alternatively, maybe the bot could modify the "Summary Update" comment itself -- adding a "refresh button" linked to a refresh url of sorts. When any user follows the link, just arriving there initiates an action that checks for the reaction from the right person... A little convoluted, and perhaps I'm misunderstanding probot architecture, and this would be really tough :)
Curious your thoughts though!
Here are some statements -- :mag: facts, :heart: feelings, and :bulb: ideas -- related to this bot premise:
Curious about any feedback or suggestions on this idea! Thanks for your attention :heart:
Collaborative Summary
There is now a demo in the comments below!!! :tada: :taco: :tada: