Closed raduiman-zz closed 5 years ago
I've started to work on this. -> branch ' issue-438 '
Updated this branch. Added 3 new methods.
def extract_commit_data(self):
for commit in self.repo_data.commits():
self.commit_message = commit.message
self.commit_date = commit.commit.author.get("date")
self.commit_sha = commit.sha
self.commit_author = commit.commit.author.get("name")
self.commit_author_email = commit.commit.author.get("email")
self.commit_url = commit.url
def last_checked(self, repo_name):
return json.load(self.load(CHANGELOG_REPO_PATH, repo_name.lower() + ".json")).get("0").get("last_checked")
def local_version(self, repo_name):
return json.load(self.load(CHANGELOG_REPO_PATH, repo_name.lower() + ".json")).get("0").get("last_release").get("version")
========================================================
Please note that we are receiving a shortcommit object and that one does not return files_changed
Continued to implement the GIT part. All to work in progress is on branch issue-438
Added the methods to get the commit information from Github repositories.
Added two main methods to iterate through the repositories and through commits:
Added commit_files_changed, last_check, release_date and list_of_commits to FIC_DataVault
Updates:
Add the logic to save only the commits that affect the infrastructure according to: 'folders-to-check', 'keyword == deploy' and 'release version tag'
Branch: Issue-438 commit: https://github.com/mozilla-releng/firefox-infra-changelog/commit/4d2c1c3561d06eb37cb1a822f27341b972e920b0
Recent updates:
Recent updates:
Renamed a few definitions:
delete_element_0()
to remove_first_element()
add_element_0_hg()
to add_first_element_hg()
add_element_0_git()
to add_first_element_git()
Changed the update_json() to save the data in the directory data
by
default or if it's specified, it will use the specified directory.
next(iter(some_dict))
removes the need of converting the dictionary
to a list (to get the first element from it) or to use iterators.Fixed in PR #448
Rewrite the logic to get and manage the commits from git repositories using OOP classes and methods.
Where to start:
Using the logic from the modular version ->/fic_modules/git.py, implement the functionality in OOP.
Requirements