canonical-ubuntu-qa team mailing list archive
-
canonical-ubuntu-qa team
-
Mailing list archive
-
Message #03260
Re: [Merge] ~andersson123/autopkgtest-cloud:charm-inventory-amendments into autopkgtest-cloud:master
Diff comments:
> diff --git a/dev-tools/generate-charm-inventory b/dev-tools/generate-charm-inventory
> index 2aa5785..3758b0c 100755
> --- a/dev-tools/generate-charm-inventory
> +++ b/dev-tools/generate-charm-inventory
> @@ -26,12 +26,14 @@ commits = {
> "cloud": [],
> "misc": [],
> }
> +changed_files = []
Don't you need a set to do this? Won't you end-up with some duplicates?
>
> for commit in repo.iter_commits(branch, max_count=1000):
> if str(commit) == up_to:
> break
> - if "Merge branch" in commit.message:
> + if str(commit.message).startswith("Merge "):
> continue
> + changed_files += commit.stats.files
> if "web: " in commit.message:
> commits["web"].append(
> "- [%s](%s%s)"
> @@ -52,4 +54,6 @@ inventory = ""
> for key, item in commits.items():
> inventory += "**%s**\n%s\n" % (key, "\n".join(item))
>
> +inventory += "\n**Changed files:**\n" + "\n".join(changed_files)
Maybe some sorting would be good here, to avoid having them in chaotic order (even though I love chaos!)
> +
> print(inventory)
--
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/461964
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:charm-inventory-amendments into autopkgtest-cloud:master.
References