<scribe> Scribenick: AmeliaBR
ada: You're going to see how I
chair a WG & how I automate work.
... I'm really lazy, so I use a bot to do as much as I can, or
to pass responsibility to other members.
... Things like organizing meetings & assembling agendas. I
have a bot that find agenda tags people have added anywhere in
our GitHub organization and compile it as an agenda, with who
tagged it & why & a link to the issue. It turns it into
a PR on our schedules.
astearns: How do you know *why* someone tagged an issue?
ada: They have to leave a comment
"/agenda {reasons}".
... This makes it easier when I'm chairing meetings. I know
which person to pass the issue to for discussion.
... We also generate newsletters that we send to implementers,
e.g., what's changed in the spec, this also uses tags.
... But it's still too much work. I need to tag all the PRs
myself.
... want to automate that.
... I also have a way group members can leave a "/editor
triage" comment & it goes in a queue for editor
attention.
... It really helps everyone work asynchronously. People aren't
waiting for me to wake up when they're in another timezone if
they want to add something to the agenda. But it isn't fully
automated, I can always review.
... I'm more a chair cyborg than a chair robot.
... GitHub makes all this work. All our agendas and
communication are in repos. We don't really use mailing
lists.
<jorydotcom> link: https://iw-agenda-generator.glitch.me
ada: This is one of the first
tools I created (screen shot of a web form). I just fill in a
few things and it creates a PR for an agenda. It doesn't even
need authentication; it uses the public API, then creates the
PR as a GET request, with all the text crammed into the URL on
GitHub. Then everything's populated for the PR.
... The app includes a Markdown preview so I can see what it
will look like ahead of time.
Ralph: Now, these agenda items all came from "/agenda" comments?
ada: yes, I can click through to
that issue and show you where it is [demonstrates]
... Underlying all this is just the GitHub search interface.
You can create a fetch query with search parameters, it can
even search across repos.
... This gives you a big JSON of results.
plh: So this is just searching for the label. How do you know if an agenda request is better waiting for another meeting?
ada: You could create a different
label, e.g. for a F2F meeting. Or I can just see the comment
when I'm reviewing and edit it out of the markdown file.
... For generating PRs automatically, it's just a link target
that compiles all the data into the URL query. There are limits
on how many characters you can include; I haven't had much
problem with that for this use case; I limit people's comments
to the first two paragraphs.
... This approach has changed building an agenda from half day
to a few minutes. I used to have to poke everyone, now I wait
for them to make an agenda request.
... We have other labels for automation, e.g. "fixed by pending
PR". A bot sees the PR & finds the matching issue &
adds the labels.
AmeliaBR: GitHub now has something like "fixed by pending PR". But it's very subtle, doesn't show up everywhere.
ada: Well, this is a big
hammer.
... The other benefit of label bots is that they can add labels
for users who don't have those permissions.
... Our probot has a GH account, which has the right
permissions on our repo.
<jorydotcom> link: https://glitch.com/~probot-hello-world
<jorydotcom> link: https://glitch.com/~probot-label
ada: The bot itself runs as a
Glitch app. You can remix it to adapt it for your repo.
... There's a YAML file that describes what types of GitHub
events it needs to respond to.
... I built it on someone else's bot code. My own first bot was
only 9 lines of custom JS.
... It looked for the /agenda comment and added the correct
labels.
... Something similar for how people can mark a PR as fixing
issues.
... Of course, you can do more complex stuff. My latest bot
scans all sorts of comments, which gets rate limited by GitHub
API unless you're authenticated. But you won't always need
that. This was an extra thing I needed for our F2F
agenda.
... Any questions about these, or has anyone else built
bots?
<ada> Slide notes: https://docs.google.com/presentation/d/101Ox-tQ0LdNrulvkPrOidaGpUo3He98zKGQL8x2Rrds/edit#slide=id.g6348c6e6c6_0_7
plh: This is really cool, we of course have lots of bots with W3C, but I haven't seen some of this.
jorydotcom: I second that. This
is really cool, I can definitely use lots of this.
... Could you say more about your newsletter?
ada: The newsletter goes out to
the immersive web public list.
... [ shows the repo and an example of the markdown rendered on
GitHub's viewer]
... I tagged various PRs to group them into different
categories. I plan to automate it so a bot will tell which
types of files the PR modifies & categorizes it
accordingly.
... Some things have changed over time. I initially included
the first PR comment as the description, but that often gets
out of date by the time a PR is merged. So now it's the final
comment & the editors fill it in. And since they use
Markdown on GH, it gets pulled in and added to the newsletter
nicely formatted. The group editors do this when they're
creating the merge commit.
jorydotcom: Is this also your probot?
<ada> https://glitch.com/~iw-newsletter-generator
ada: No, it's another bot. Very
similar to the agenda bot; it's also on glitch.
... It does a GitHub Fetch, authenticated with my GH user name
and API key.
... Some of these parameters are just copied from GH
docs.
... The fetch returns JSON & then I extract the markdown
bits and put in a template.
... The query search looks for repos in our organization,
labels, and so on.
... It's a complex search URL, but you don't have to create it
by hand. It's the same URL you'd get after constructing a
search from the advanced search web page.
... One thing: that search actually finds issue object. PRs on
GH are both issues and PR objects. So there's a separate fetch
to get the extra PR object data, based on the issue
number.
... I do end up really hammering the API endpoint, takes a few
minutes, but in the end I have a JSON object with all the
information I need.
... Another thing that's interesting is about the tags — I'll
need to go tag a PR just so you can see it in action — this PR
touches both markdown and bikeshed. So I need to tag it as both
changes to explainer and spec. This is the slow part I want to
automate.
... Now I run my app — and it's not showing up.
AmeliaBR: Maybe a caching delay on the GH API?
ada: Maybe. I can show another app. This one looks for the F2F tag. What I wanted to show was the SVG version of the GitHub tags with their colour backgrounds, so they show up pretty. I use a node library for that. You give it the text and the colour, it generates an SVG that looks like the GitHub native tags. And the GitHub API exposes the colour you need in the issue data.
<ada> https://glitch.com/~iw-find-by-label
ada: I can also show you the final source code for my robot. It has three commands to automatically add labels.
<ada> https://glitch.com/~probot-label
ada: Now, you'll also need to
know how to install robots from the GitHub interface. Go to the
organization, then Settings, then Installed GitHub Apps. So
that's where I gave permissions to the probot-label app.
... For repos on the w3c organization, you probably want to
control these permissions by repo, instead of searching across
the full organization.
astearns: You mentioned that you put your meeting minutes in GitHub. Do you have that automated?
ada: No, a group member copies the minutes URL generated by RRSAgent into a PR and works from there.
astearns: Are there auto links to the exact section for each issue?
ada: no, just one link to the
full minutes
... It's not really a W3C thing, but something else I've
automated at Samsung is this page that shows sponsorship
requests for our events. That's all pulled from issues in our
internal repo. If someone wants to sponsor, there's a link to
fill in a form, that generates the issue. It has a checkbox
list that we can then mark the steps being done.
plh: Is there an event that a bot can listen to for when those checks happen.
ada: Not that I know of, but I haven't needed it yet.
duerst: You mentioned about not wanting your bots to search all of w3c, but for internationalization that would be very useful.
plh: We do have some organization level bots at w3c, we could do that.
ada: You could use my bot for that type of thing, just need the permissions.
duerst: We have the labels already, just need a good way to keep track.
ada: And you can also do select
repositories if need be. It's an option in the permissions,
which repositories a bot has access to.
... The real magic is the labelling bot. It allows anyone to
add these specific labels.
<plh> https://github.com/dontcallmedom/github-notify-ml-config/blob/master/mls.json
ada: For something really simple, like searching for labels for an agenda, you don't even need an API key.
plh: this is an example of a config we have set up for one of our W3C bots, which allows individual chairs to opt in for their repos.
<plh> https://github.com/w3c/validate-repos/blob/master/report.json
ada: Already, my agenda bot is used by others. E.g., Dan used it for TAG. But, that turned out to have issues; they had more agenda requests than get returned in a single GH API response & I don't currently page through extra responses. But you're all welcome to fork & expand on them.
RRSAgent: make minutes
This is scribe.perl Revision: 1.154 of Date: 2018/09/25 16:35:56 Check for newer version at http://dev.w3.org/cvsweb/~checkout~/2002/scribe/ Guessing input format: Irssi_ISO8601_Log_Text_Format (score 1.00) Succeeded: s/This/...This/ Succeeded: s/q:/Ralph:/ Succeeded: s/Another useful GitHub tool is there/Underlying all this is just the GitHub/ Succeeded: s/minutes/minutes URL/ Present: Ralph cb ada AmeliaBR jorydotcom hober duerst Found ScribeNick: AmeliaBR Inferring Scribes: AmeliaBR WARNING: No "Topic:" lines found. WARNING: No meeting title found! You should specify the meeting title like this: <dbooth> Meeting: Weekly Baking Club Meeting WARNING: No meeting chair found! You should specify the meeting chair like this: <dbooth> Chair: dbooth WARNING: No date found! Assuming today. (Hint: Specify the W3C IRC log URL, and the date will be determined from that.) Or specify the date like this: <dbooth> Date: 12 Sep 2002 People with action items: WARNING: No "Topic: ..." lines found! Resulting HTML may have an empty (invalid) <ol>...</ol>. Explanation: "Topic: ..." lines are used to indicate the start of new discussion topics or agenda items, such as: <dbooth> Topic: Review of Amy's report WARNING: IRC log location not specified! (You can ignore this warning if you do not want the generated minutes to contain a link to the original IRC log.)[End of scribe.perl diagnostic output]