def update(gh, repo): iss = find_issue(gh, repo) if iss is None or iss.is_closed(): return agreed = ["cmr", "homu", "gitter-badger"] for comment in iss.iter_comments(): if any(text in comment.body.lower() for text in considered_agreed): agreed.append(comment.user.login) new_text = iss.body for u in agreed: print("{} agreed".format(u)) new_text = new_text.replace("[ ] @{}".format(u), "[x] @{}".format(u)) iss.edit(body=new_text) if "[ ]" in new_text: return False return True
def update(gh, repo): iss = find_issue(gh, repo) if iss is None or iss.is_closed(): return for comment in iss.iter_comments(): if "f9f99cca7ae9cc3d2e16" in comment.body: return iss.create_comment(""" My scripts have reported that they cannot open a relicensing pull request automatically for this repository. Sorry about that! There's a simple script here that you could use: https://gist.github.com/kstep/f9f99cca7ae9cc3d2e16 Though be sure to change "The Rust Project Developers" to the appropriate text in LICENSE-MIT. Alternatively, I can create the PR manually. Either works for me, just let me know! """)