0

Currently, our department has a working python script that utilizes the pyGithub library and API to check/match for a specific string in a specific file. It checks all release branches that were created and states if there is a match. The issue is it only verifies the latest commit of each release branch rather than the entire commit history of each branch due to the restrictions of the pyGithub library. Is there a different library or method that can accomplish this? This string is basically some number that can be generated based on equipment used and thus we need to verify the commit history and not just the latest commit of each branch. Our repo is extremely large and has several thousand commits.

torek
  • 448,244
  • 59
  • 642
  • 775
  • 1
    are you looking for a `pyGithub` implementation or a `git` through `CLI` implementation ? What code has been tried ? – azbarcea Oct 19 '21 at 15:27
  • Please provide enough code so others can better understand or reproduce the problem. – Community Oct 19 '21 at 15:28
  • I've tried to use the git grep function however it seems like it is giving me issues. It traverses through maybe 10 commits until it freezes and stops displaying anymore. The current main code acquires the name of all release branches and traverses through their last commit. It uses the following line "contents = repo.get_contents(file, branches.name)" and a re.findall regex that has been set up in another function. It attempts to search in two specific files for the patterns needed. – Khaled Q Oct 19 '21 at 16:09

0 Answers0