scripts/patchreview: Add commit to stored json data

Save commit data when writing to the json file so the results can
be copared/extended later.

(From OE-Core rev: da761ac1984ee2a06ded905fc4ad878ef7d613e4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2022-05-13 17:54:27 +01:00
parent fdda6460c0
commit a0d120dd56

View File

@@ -222,6 +222,7 @@ if __name__ == "__main__":
row = collections.Counter()
row["total"] = len(results)
row["date"] = subprocess.check_output(["git", "-C", args.directory, "show", "-s", "--pretty=format:%cd", "--date=format:%s"]).decode("utf-8").strip()
row["commit"] = subprocess.check_output(["git", "-C", args.directory, "show", "-s", "--pretty=format:%H"]).decode("utf-8").strip()
for r in results.values():
if r.upstream_status in status_values:
row[r.upstream_status] += 1