Moya: [RFC]: extend MoyaBot to automatically follow up with issues & PRs where we're waiting for author response

Created on 4 May 2017  ยท  39Comments  ยท  Source: Moya/Moya

I recently saw @KrauseFx's talk on scaling open source communities (great talk, I'd recommend it to everyone who's doing anything at all in open source). https://news.realm.io/news/tryswift-felix-krause-scaling-open-source-communities-github-management

One of my big take aways was fastlane's fastlane-bot. Which would automatically follow up with issues and close them if there was no response.
Right now, a couple of contributors have been manually doing that, but I think it would be awesome if we could add some of fastlane-bot's functionality to our bot so we don't have to politely close stale issues

Any thoughts from other contributors? Does anyone want to take a shot at implementing that for MoyaBot?

enhancement question

Most helpful comment

The issue was created to integrate the bot, and because it is both integrated and working now, there is a reason to close it ๐Ÿ˜„ We can create another issue for things related to this bot if something pops up.

Thanks everyone for feedback & help! ๐ŸŽ‰

All 39 comments

I really like this - though looking at fastlane-bot's repository, I have no idea how it would work implementing it. Does anybody have an idea, or should we go ahead and file an issue there?

We can wait for Peril from @orta. It looks really promising. It is not fully stable yet, but it can already post on issues AFAIK.

Peril does look really nice, let's wait for that to be usable

Just came across this: https://github.com/probot/stale ๐Ÿค”

This one is really cool! I think we can try to do it. What do you think, @Moya/contributors?

Edit: Also, can we do it using MoyaBot?

Sure, this would be really nice! Re: MoyaBot: I think you should ping @ashfurrow to ask if that's possible. :)

We just merged it in on CocoaPods - https://github.com/CocoaPods/CocoaPods/pull/6745 - I can't really compete with GitHub on resources for this kind of project, so I wouldn't wait on peril

Ye, and this one is looking cool. The question is if we want/can use MoyaBot for that. Also, we would need someone to do a PR with config. Let's just start with something and we will adjust values in a PR if needed.

๐Ÿ˜†
I'm happy this is happening!

I was talking with Ash and we've figured that MoyaBot would need a write access so it would be better to use different bot or someone else's access token. Thus, it might be better just to install this stale bot and go from that. I'm gonna do a PR with some default values for config so we can discuss it there ๐Ÿ‘

Awesome! ๐Ÿ‘Š

I've opened a PR#1101 with the config, please let me know what do you guys think!

What we need to get this bot running:

  • [x] #1101 merged.
  • [x] Re-visit issues that might have need a label to not flag it.
  • [x] Install the bot & iterate with the feedback.

Is there something I didn't think about? ๐Ÿค”

That sounds good to me. Thanks for figuring this out!!

On to-do 2, let's wait to add labels until we've iterated on the bot, just
in case we end up not liking it
On Thu, May 25, 2017 at 8:21 AM ลukasz Mrรณz notifications@github.com
wrote:

I've opened a PR#1101 with the config, please let me know what do you guys
think!

What we need to get this bot running:

Is there something I didn't think about? ๐Ÿค”

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Moya/Moya/issues/1071#issuecomment-304037990, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADo1dFodJSG0iR_dKP_AKOVN3RAbcAP6ks5r9Zx2gaJpZM4NQHMU
.

I've revisited some issues anyways - I've flagged most of documentation ones to leave it as it is, because it is important that we have these open and add it in the future. If you guys want to make last review, I'm gonna try to launch the bot tomorrow morning or so.

@sunshinejr thanks for taking the time! โค๏ธ

Bot added - let see how it goes :D

Wanted to make a quick summary after a month, but seems like our bot is stuck? Maybe wrong configuration? Anyone sees something strange here? Because in issue like #1056, label was added 28 days ago, which means 14 days ago it should be closed, but it is still open ๐Ÿค”

@sunshinejr The configuration looks correct to me. Do you think its a permission issue considering it can comment on issues but not close them?

The link in the closeComment looks like it causes a different syntax coloring -- could this be an issue?

EDIT: I created #1157 in case

๐Ÿ‘ nice catch, @SD10. Can you take care of that issue and see if this PR helped? Because from the permission side it looks like it has everything it needs:
zrzut ekranu 2017-07-03 o 22 23 23

@sunshinejr Thanks for checking the permissions. This change is already merged in. It may take some time to determine if this changes anything. There's little and no official documentation on _when_ probot will scan the issues. Some info here if anyone is interested.

I'll continue watching this until it's resolved.

Great, thank you Steven! ๐Ÿป

I think the problem is with our label having spaces.
The method used to grab stale issues at probot/stale doesn't wrap the label in quotes when performing the search query to find closable issues. I created a PR at stale to fix this (if it is the problem ๐Ÿ˜…).

@SD10 That's exactly what I was testing https://github.com/pedrovereza/stale-bot-test/issues/2 ๐Ÿ˜„

@pedrovereza You read my mind! I was going to ask you to please test this there ๐Ÿ‘

@pedrovereza What do you think about changing our label to one without spaces? The support at stale looks limited. I don't think they'll be merging that PR anytime soon.

@SD10 I'm ok waiting a bit longer for them to take a look at the PR. But if we decide to change the label, we need to revisit all the ones currently marked by the bot.

@sunshinejr @AndrewSB @BasThomas thoughts? ๐Ÿ˜„

This should be as easy as changing the name of one label & updating the StaleBot config, correct? If so, and if its gonna fix the bot, I am up for the change ๐Ÿ‘ I also don't mind waiting few days before we make a change, but seeing from the Issues/PRs it might be quite some time before they merge it.

@sunshinejr We would probably have to resolve all the current issues manually.

Updating a label is an action that will update the last modified date of an issue. Issues that are currently marked as no recent activity won't get marked with the new label until 45 days after they were marked with the first label ๐Ÿ˜

It would work immediately for all issues not already marked.

But if we rename the label to something without spaces, then the update date shouldn't change (since it is the same label object but a different name) and if we change name of the label in the config, the bot should catch that one as well, right?

For instance, we could change label name to no-recent-activity or no_recent_activity in both Issues & bot config (until they fix the issue). Or am I missing something obvious here? ๐Ÿ˜„

The API has an "updated_at" for issues. This might (?) be updated when a label changes? I'm not sure.

We can try changing the label name and bot config, worst case we'll have to close them manually (which was the original plan anyway) ๐Ÿ˜„

Well, we can (probably) make sure it will work! ๐Ÿ˜„

I've just tested it on my test repo. My steps to reproduce:

  1. Create a new label with space, "new label"
  2. Create an issue with this label.
  3. Check updated_at field (since from here I understand that it queries based on updated_at field). Date: 2017-07-10T15:05:36Z
  4. Rename the label to a label without space, "new_label".
  5. Check updated_at field again. Date: 2017-07-10T15:05:36Z, which is the same as before.

_(Note: I was using this request to test it.)_

So if the data is correct and I didn't miss anything, whenever we change the label, the update_at field of the issue is not updated. Therefore, we can assume we won't need to take care of all the issues above.

That was fun! ๐Ÿ˜„

I actually think it does the query using the updated search qualifier:
i.e) is:issue is:open updated:>2017-07-10

I think that PR should've taken effect immediately, so I'm thinking there's a stateful issue.
Regardless, I think that was the right step so let's see how the next marked issue is handled.

It looks like probot has stopped slacking off ๐Ÿ˜….
I don't know if we want to keep this issue open to discuss the merit of this automation tool or close it now that the bot has completed a full cycle.

I'm up for closing this issue now that the bot is finally working :tada:

We originally wanted @MoyaBot to do the job, but I don't think the effort to deploy our own bot is worth it.

@MoyaBot: nothing personal โค๏ธ

The issue was created to integrate the bot, and because it is both integrated and working now, there is a reason to close it ๐Ÿ˜„ We can create another issue for things related to this bot if something pops up.

Thanks everyone for feedback & help! ๐ŸŽ‰

I saw that over at Fastlane, there's actually another step locking an issue some time after an issue has been closed. Would it be possible to add this as well? And then maybe add another comment before locking that asks to create a new issue?

Is that also using probot/stale, @BasThomas? I think we had this conversation here at #1101 and it wasn't possible, but using another plugin could work (though I don't know if we can do it without deploying it).

Ah. No, it uses their Fastlanebot. Let's hold off on this for now then; not that important

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jimmy0251 picture jimmy0251  ยท  24Comments

jdisho picture jdisho  ยท  26Comments

pete183 picture pete183  ยท  25Comments

BasThomas picture BasThomas  ยท  27Comments

AndrewSB picture AndrewSB  ยท  23Comments