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

Martine Lenders notifications at github.com
Fri Jan 25 20:41:19 CET 2019


miri64 commented on this pull request.



> +                        help="Backport branch format. "
+                             "Fields '{release}' and '{origbranch} will be "
+                             "replaced by the release name and remote branch "
+                             "name.")
+    parser.add_argument('-d', '--gitdir', type=str, default=os.getcwd(),
+                        help="Base git repo to work from")
+    parser.add_argument("PR", type=int, help="Pull request number to backport")
+    args = parser.parse_args()
+
+    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)

The function should raise an exception? Yes. Otherwise, I'm not sure what you mean.

-- 
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#discussion_r251111905
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190125/6e54f804/attachment-0001.html>


More information about the notifications mailing list