mozilla-releng / firefox-infra-changelog

Automated tool which builds a changelog of commits happening on git and hg that could affect Firefox CI Infra.
2 stars 8 forks source link

Construct the data to be writen into json files #449

Closed zsoltfay closed 5 years ago

zsoltfay commented 5 years ago

What do we have right now:

At the moment we are only saving the new commits into the json files.

What we miss:

Solution

have a dedicated dictionary that we build:

zsoltfay commented 5 years ago

The first additions to branch issue-449:

_local_version() method was unused - commit link 0c405057aa14bdc31a6f8691acc7568a10978cef:

this method was never called thus self.local_version would always be None

Changed _get-release() to be more universal - commit 86704202c9a3397bcadf2e48690362b42c6933b4:

By using addonscript as the testing repository the results were as expected: This test code:

a = FICGithub()
a.repo_name = "addonscript"
a._repo_team()
a.read_repo()
a.repo_type = "tag"
a.release_version = a._get_release(1)
print("first element: ", a._generate_first_element_git(a.repo_type))
print("last official release: ", a.release_version)

Returned the expected versions:

first element:  {'0': {'last_checked': '2019-05-09T03:02:57.750501', 'version': '0.4'}}
last official release:  1.0

Process finished with exit code 0
mutterroland commented 5 years ago

453 <- Hg part of this issue

raduiman-zz commented 5 years ago

The HG part was implemented in PR: https://github.com/mozilla-releng/firefox-infra-changelog/pull/459 and GIT in: https://github.com/mozilla-releng/firefox-infra-changelog/pull/448