{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":312053922,"defaultBranch":"master","name":"b4","ownerLogin":"phil-blain","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2020-11-11T18:20:46.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/44212482?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1681585618.0","currentOid":""},"activityList":{"items":[{"before":"f5b454058e720b7c70bb7145d2da05250a214330","after":"c01b1767756f301fae9c21b1af7ed63c0db569e0","ref":"refs/heads/am-cherry-pick-suggestion","pushedAt":"2023-04-15T19:10:04.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"phil-blain","name":"Philippe Blain","path":"/phil-blain","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44212482?s=80&v=4"},"commit":{"message":"am, shazam: allow cherry-picking an out-of-series patch\n\nReviewers sometimes include a patch as a reply when reviewing a\ncontributor's series, for example, to suggest tweaks or additional\nchanges. The contributor might want to add that patch to their series\nfor the next revision.\n\nCurrently, using 'b4 shazam -P_ $msgid', where msgid is the message-id\nor full URL of the reviewer's message, does not work:\n\n $ b4 am -o- -P_ ZDnCMegeiw0kT5oj@nand.local\n Analyzing 2 messages in the thread\n No patches found.\n\nmbox.py::make_am returns early because the LoreSeries 'lser' returned by\nlmbx.get_series is empty ('None'). It is empty because when using '-P_',\nb4::retrieve_messages only retrieves the specific message-id given (and\nits replies), so the LoreSeries 'lmbx' created in make_am does not have\nany series.\n\nAlso check if the user asked to cherry-pick a specific message-id before\nreturning early in make_am. This allows us to reach the 'if\ncmdargs.cherrypick == '_'' condition, but then we iterate on\nlser.patches to find the patch to cherry-pick, and so get a runtime\nerror:\n\n $ b4 am -o- -P_ ZDnCMegeiw0kT5oj@nand.local\n Analyzing 2 messages in the thread\n Traceback (most recent call last):\n File \"/Users/Philippe/Code/b4/b4/command.py\", line 381, in \n cmd()\n File \"/Users/Philippe/Code/b4/b4/command.py\", line 364, in cmd\n cmdargs.func(cmdargs)\n File \"/Users/Philippe/Code/b4/b4/command.py\", line 91, in cmd_am\n b4.mbox.main(cmdargs)\n File \"/Users/Philippe/Code/b4/b4/mbox.py\", line 719, in main\n make_am(msgs, cmdargs, msgid)\n File \"/Users/Philippe/Code/b4/b4/mbox.py\", line 82, in make_am\n for lmsg in lser.patches[1:]:\n AttributeError: 'NoneType' object has no attribute 'patches'\n\nFix this by creating a fake LoreSeries and adding to it any followup\nmessages in 'lmbx' with a diff in the body.\n\nSigned-off-by: Philippe Blain ","shortMessageHtmlLink":"am, shazam: allow cherry-picking an out-of-series patch"}},{"before":null,"after":"f5b454058e720b7c70bb7145d2da05250a214330","ref":"refs/heads/am-cherry-pick-suggestion","pushedAt":"2023-04-15T19:06:58.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"phil-blain","name":"Philippe Blain","path":"/phil-blain","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/44212482?s=80&v=4"},"commit":{"message":"am: allow cherry-picking an out-of-series patch\n\nReviewers sometimes include a patch as a reply when reviewing a\ncontributor's series, for example, to suggest tweaks or additional\nchanges. The contributor might want to add that patch to their series\nfor the next revision.\n\nCurrently, using 'b4 shazam -P_ $msgid', where msgid is the message-id\nor full URL of the reviewer's message, does not work:\n\n $ b4 am -o- -P_ ZDnCMegeiw0kT5oj@nand.local\n Analyzing 2 messages in the thread\n No patches found.\n\nmbox.py::make_am returns early because the LoreSeries 'lser' returned by\nlmbx.get_series is empty ('None'). It is empty because when using '-P_',\nb4::retrieve_messages only retrieves the specific message-id given (and\nits replies), so the LoreSeries 'lmbx' created in make_am does not have\nany series.\n\nAlso check if the user asked to cherry-pick a specific message-id before\nreturning early in make_am. This allows us to reach the 'if\ncmdargs.cherrypick == '_'' condition, but then we iterate on\nlser.patches to find the patch to cherry-pick, and so get a runtime\nerror:\n\n $ b4 am -o- -P_ ZDnCMegeiw0kT5oj@nand.local\n Analyzing 2 messages in the thread\n Traceback (most recent call last):\n File \"/Users/Philippe/Code/b4/b4/command.py\", line 381, in \n cmd()\n File \"/Users/Philippe/Code/b4/b4/command.py\", line 364, in cmd\n cmdargs.func(cmdargs)\n File \"/Users/Philippe/Code/b4/b4/command.py\", line 91, in cmd_am\n b4.mbox.main(cmdargs)\n File \"/Users/Philippe/Code/b4/b4/mbox.py\", line 719, in main\n make_am(msgs, cmdargs, msgid)\n File \"/Users/Philippe/Code/b4/b4/mbox.py\", line 82, in make_am\n for lmsg in lser.patches[1:]:\n AttributeError: 'NoneType' object has no attribute 'patches'\n\nFix this by creating a fake LoreSeries and adding any followup messages\nin 'lmbx' with a diff in the body.\n\nSigned-off-by: Philippe Blain ","shortMessageHtmlLink":"am: allow cherry-picking an out-of-series patch"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"Y3Vyc29yOnYyOpK7MjAyMy0wNC0xNVQxOToxMDowNC4wMDAwMDBazwAAAAMZd0e8","startCursor":"Y3Vyc29yOnYyOpK7MjAyMy0wNC0xNVQxOToxMDowNC4wMDAwMDBazwAAAAMZd0e8","endCursor":"Y3Vyc29yOnYyOpK7MjAyMy0wNC0xNVQxOTowNjo1OC4wMDAwMDBazwAAAAMZdxNy"}},"title":"Activity ยท phil-blain/b4"}