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

Issue 438 - ( rewrited a part of PR #443 ) the logic that manage the commits from github repositories ( OOP ) #448

Closed raduiman-zz closed 5 years ago

raduiman-zz commented 5 years ago

This PR will:

Public methods:

FICGithub().start(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/bf48b7609f0baff69110c2a2891c096b2d2eba6e

How to use:

FICGithub().get_repo_url(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/7db3e7e3392078d8ed7861ebde9075583959ad41

Private methods:

self._repo_team(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/a1174b56ed252b102c0d0b666dc67ccd9750f6cf

self._repo_files(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/dc752cc5d303ef1e8d1daa507a44654cce27d073

self._extract_repo_type(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/75148feebea8ce95ecc9585d73b1fb250650c0fb

self._local_version(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/1d1ef280fdee399cb380c3dbc0a8c858efe31b23

self._get_release(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/514b36519fb39bba662c2dd2ec2b3d8031f539d2

self._get_version_path() and self._build_puppet_version(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/1cf960211b835317360c7455d4bdb9b9df27dc03

self._compare_versions(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/1cf960211b835317360c7455d4bdb9b9df27dc03

self._last_checked(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/708a42cde62b3a3fd00f16dcbc83892ff020cae6

self._commit_iterator(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/353bc86ff25ec7525030c901119f87436705fe1f

self._store_data():, self._get_sha():, self._get_message():, self. _get_date():, self._get_author():, self._get_author_email():, self._get_url():, self._get_files(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/353bc86ff25ec7525030c901119f87436705fe1f

self._compare_files(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/839dc589e2a9c0c5675f3db748b748798c29d45f

self._construct_commit(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/1b6010573b4c106cb382214594064749e62df2a7

self._commit_filter(): https://github.com/mozilla-releng/firefox-infra-changelog/pull/448/commits/a187b3e342f20591d00b6488f1258b612a3bd7f5

For testing you can use the following patch:

issue-438-1.txt

zsoltfay commented 5 years ago

Added changes to FIC_Github.py and FIC_FileHandler.py

FIC_Github.py changes 6a2e2cb

_last_checked()

_commit_filter()

_repo_switcher()

Removed hard coded argument on line 290

FIC_FileHandler.py changes 882f5e8

_check_repo_files()

_create_missing_repo_files()

_generate_first_element_git()

_generate_first_element_hg()

_def _extract_repo_type()