github.com/kubeflow/training-operator@v1.7.0/docs/release/release.py (about)

     1  from github import Github
     2  import re
     3  
     4  
     5  class ChangelogGenerator:
     6      def __init__(self, github_repo):
     7          # Replace <your_github_token> with your Github Token
     8          self._github = Github('<your_github_token>')
     9          self._github_repo = self._github.get_repo(github_repo)
    10  
    11      def generate(self, pr_id):
    12          pr = self._github_repo.get_pull(pr_id)
    13  
    14          return "{title} ([#{pr_id}]({pr_link}), @{user})".format(
    15              title=pr.title,
    16              pr_id=pr_id,
    17              pr_link=pr.html_url,
    18              user=pr.user.login
    19          )
    20  
    21  
    22  # generated by `git log <oldTag>..HEAD --oneline`
    23  payload = '''
    24  6f1e96c4 Update container image for v1.1.1 (#1328)
    25  47a74b73 add a specific version of tensorflow_datasets (#1305)
    26  e3061132 Remove vendor folder (#1288)
    27  eb362bd8 Fix invalid pointer when tfjob is deleted (#1285)
    28  0c41b273 fix get_logs pod_names type and iteration blocking (#1280)
    29  af5bdd58 Add job namespace to `tf_operator_jobs_*` counters (#1283)
    30  6fd9489e fix custom_api.delete_namespaced_custom_object args (#1281)
    31  c095f7a9 feat: upgrade kubeflow common and volcano version (#1276)
    32  13b17b0e Use remote Kustomize build option in standalone installation instructions (#1266)
    33  faf34868 fix: Remove the dup comment tag (#1274)
    34  9a297876 add podgroups rule in cluster-role.yaml (#1272)
    35  58c9bc4a Fix: the "follow" of TFJobClient.get_logs (#1254)
    36  3d9e7c8a Add task type annotation for pods when EnableGangScheduling is true. (#1268)
    37  8d179f70 Fix: Remove Github CD workflow (#1263)
    38  '''
    39  
    40  g = ChangelogGenerator("kubeflow/training-operator")
    41  for pr_match in re.finditer(r"#(\d+)", payload):
    42      pr_id = int(pr_match.group(1))
    43      print("* {}".format(g.generate(pr_id)))