[riot-notifications] [RIOT-OS/RIOT] dist/tools: Add script for backporting PR's (#8968)

Martine Lenders notifications at github.com
Tue Feb 12 10:50:54 CET 2019


miri64 commented on this pull request.



> +    gittoken = args.keyfile.read().strip()
+    g = GitHub(token=gittoken)
+    # TODO: exception handling
+    status, user = g.user.get()
+    if status != 200:
+        print("Could not retrieve user: {}".format(user['message']))
+        exit(1)
+    username = user['login']
+    status, pulldata = g.repos[ORG][REPO].pulls[args.PR].get()
+    if status != 200:
+        print("Commit #{} not found: {}".format(args.PR, pulldata['message']))
+        sys.exit(2)
+    if not pulldata['merged']:
+        print("Original PR not yet merged")
+        exit(0)
+    print("Fetching for commit: #{}: {}".format(args.PR, pulldata['title']))

One thing I noticed here: if I have a multi-line commit message it shows the whole message, not just the summary line.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/8968#pullrequestreview-202570951
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190212/748cab6c/attachment.html>


More information about the notifications mailing list