You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/06/13 04:52:39 UTC
[GitHub] [airflow] jhtimmins opened a new pull request #9270: Add airflow GitHub script
jhtimmins opened a new pull request #9270:
URL: https://github.com/apache/airflow/pull/9270
This adds a Github counterpart to the airflow-jira script that generates comparisons between releases as well as changelogs.
---
Make sure to mark the boxes below before creating PR: [x]
- [x] Description above provides context of the change
- [x] Unit tests coverage for changes (not needed for documentation changes)
- [x] Target Github ISSUE in description if exists
- [x] Commits follow "[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)"
- [x] Relevant documentation is updated including usage instructions.
- [x] I will engage committers as explained in [Contribution Workflow Example](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#contribution-workflow-example).
---
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
Read the [Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines) for more information.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on a change in pull request #9270: Add airflow GitHub script
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #9270:
URL: https://github.com/apache/airflow/pull/9270#discussion_r439777952
##########
File path: dev/airflow-github
##########
@@ -0,0 +1,218 @@
+#!/usr/bin/env python3
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This tool is based on the Spark merge_spark_pr script:
+# https://github.com/apache/spark/blob/master/dev/merge_spark_pr.py
+
+from collections import defaultdict, Counter
+
+import re
+import sys
+from github import Github
+
+GIT_COMMIT_FIELDS = ['id', 'author_name',
+ 'author_email', 'date', 'subject', 'body']
+GIT_LOG_FORMAT = '%x1f'.join(['%h', '%an', '%ae', '%ad', '%s', '%b']) + '%x1e'
+pr_title_re = re.compile(r".*\((#[0-9]{1,6})\)$")
+
+try:
+ import click
+except ImportError:
+ print("Could not find the click library. Run 'sudo pip install click' to install.")
+ sys.exit(-1)
+
+try:
+ import git
+except ImportError:
+ print("Could not import git. Run 'sudo pip install gitpython' to install")
+ sys.exit(-1)
+
+STATUS_COLOR_MAP = {
+ 'Resolved': 'green',
+ 'Open': 'red',
+}
+
+DEFAULT_SECTION_NAME = 'Uncategorized'
+
+def get_commits_to_current_branch(repo, previous_version=None):
+ log_args = ['--format="%H"']
+ if previous_version:
+ log_args.append(previous_version + "..")
+
+ log = repo.git.log(*log_args)
+ return set(log.strip('"').split('"\n"'))
+
+
+def get_commits_between_tags(repo, earlier_tag, later_tag):
+ log_args = ['--format="%H"', earlier_tag + ".." + later_tag]
+ log = repo.git.log(*log_args)
+ return list(log.strip('"').split('"\n"'))
+
+
+def get_issue_status(issue):
+ status = issue.state.capitalize()
+ if status == 'Closed':
+ return 'Resolved'
+ return status
+
+
+def style_issue_status(status):
+ if status in STATUS_COLOR_MAP:
+ return click.style(status[:10].ljust(10), STATUS_COLOR_MAP[status])
+ return status[:10].ljust(10)
+
+
+def get_issue_type(issue):
+ label_prefix = "type:"
+ issue_type = DEFAULT_SECTION_NAME
+ if issue.labels:
+ for label in issue.labels:
+ if label.name.startswith(label_prefix):
+ return label.name.replace(label_prefix, "").strip()
+ return issue_type
+
+
+def print_changelog(sections):
+ for section, lines in sections.items():
+ print(section)
+ print('"' * len(section))
+ for line in lines:
+ print('-', line)
+ print()
+
+
+@click.group()
+def cli():
+ r"""
+ This tool should be used by Airflow Release Manager to verify what Github issue's
+ were merged in the current working branch.
+
+ airflow-github compare <target_version> <github_token>
+ """
+
+
+@cli.command(short_help='Compare a Github target version against git merges')
+@click.argument('target_version')
+@click.argument('github-token', envvar='GITHUB_TOKEN')
+@click.option('--previous-version',
+ 'previous_version',
+ help="Specify the previous tag on the working branch to limit"
+ " searching for few commits to find the cherry-picked commits")
+@click.option('--unmerged', 'show_uncherrypicked_only', help="Show unmerged issues only", is_flag=True)
+def compare(target_version, github_token, previous_version=None, show_uncherrypicked_only=False):
+ repo = git.Repo(".", search_parent_directories=True)
+ commits_to_current_branch = get_commits_to_current_branch(
+ repo, previous_version)
+
+ github_handler = Github(github_token)
+ milestone_issues = list(github_handler.search_issues(
+ f"repo:apache/airflow milestone:\"Airflow {target_version}\""))
+
+ num_cherrypicked = 0
+ num_uncherrypicked = Counter()
+
+ # :<18 says left align, pad to 18
+ # :<50.50 truncates after 50 chars
+ # !s forces as string
+ formatstr = "{id:<8}|{typ!s:<15}|{status!s}|{description:<83.83}|{merged:<6}|{commit:>9.7}"
+
+ print(formatstr.format(
+ id="ISSUE",
+ typ="TYPE",
+ status="STATUS".ljust(10),
+ description="DESCRIPTION",
+ merged="MERGED",
+ commit="COMMIT"))
+
+ for issue in milestone_issues:
+ commit = None
+ for event in issue.get_events():
+ # Checks if event is a commit getting merged into master.
+ if event.event == 'merged':
+ commit = event.commit_id
Review comment:
Fixed in https://github.com/apache/airflow/pull/9270/commits/f93f0ee9832614921436e669141fc779ad5a18e6
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] jhtimmins commented on a change in pull request #9270: Add airflow GitHub script
Posted by GitBox <gi...@apache.org>.
jhtimmins commented on a change in pull request #9270:
URL: https://github.com/apache/airflow/pull/9270#discussion_r439782259
##########
File path: dev/airflow-github
##########
@@ -93,6 +93,32 @@ def get_issue_type(issue):
return issue_type
+def get_commit_in_master_associated_with_pr(repo: git.Repo, issue: Issue) -> Optional[str]:
+ """For a PR Get find the associated merged commit & return is SHA"""
+ if issue.pull_request:
+ commit = repo.git.log(f"--grep=#{issue.number}", "origin/master", "--format=%H")
+ if commit:
+ return commit
+ else:
+ pr: PullRequest = issue.as_pull_request()
Review comment:
this is great. really like this optimization.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil merged pull request #9270: Add airflow GitHub script
Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #9270:
URL: https://github.com/apache/airflow/pull/9270
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on a change in pull request #9270: Add airflow GitHub script
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #9270:
URL: https://github.com/apache/airflow/pull/9270#discussion_r439772147
##########
File path: dev/airflow-github
##########
@@ -0,0 +1,218 @@
+#!/usr/bin/env python3
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This tool is based on the Spark merge_spark_pr script:
+# https://github.com/apache/spark/blob/master/dev/merge_spark_pr.py
+
+from collections import defaultdict, Counter
+
+import re
+import sys
+from github import Github
+
+GIT_COMMIT_FIELDS = ['id', 'author_name',
+ 'author_email', 'date', 'subject', 'body']
+GIT_LOG_FORMAT = '%x1f'.join(['%h', '%an', '%ae', '%ad', '%s', '%b']) + '%x1e'
+pr_title_re = re.compile(r".*\((#[0-9]{1,6})\)$")
+
+try:
+ import click
+except ImportError:
+ print("Could not find the click library. Run 'sudo pip install click' to install.")
+ sys.exit(-1)
+
+try:
+ import git
+except ImportError:
+ print("Could not import git. Run 'sudo pip install gitpython' to install")
+ sys.exit(-1)
+
+STATUS_COLOR_MAP = {
+ 'Resolved': 'green',
+ 'Open': 'red',
+}
+
+DEFAULT_SECTION_NAME = 'Uncategorized'
+
+def get_commits_to_current_branch(repo, previous_version=None):
+ log_args = ['--format="%H"']
+ if previous_version:
+ log_args.append(previous_version + "..")
+
+ log = repo.git.log(*log_args)
+ return set(log.strip('"').split('"\n"'))
+
+
+def get_commits_between_tags(repo, earlier_tag, later_tag):
+ log_args = ['--format="%H"', earlier_tag + ".." + later_tag]
+ log = repo.git.log(*log_args)
+ return list(log.strip('"').split('"\n"'))
+
+
+def get_issue_status(issue):
+ status = issue.state.capitalize()
+ if status == 'Closed':
+ return 'Resolved'
+ return status
+
+
+def style_issue_status(status):
+ if status in STATUS_COLOR_MAP:
+ return click.style(status[:10].ljust(10), STATUS_COLOR_MAP[status])
+ return status[:10].ljust(10)
+
+
+def get_issue_type(issue):
+ label_prefix = "type:"
+ issue_type = DEFAULT_SECTION_NAME
+ if issue.labels:
+ for label in issue.labels:
+ if label.name.startswith(label_prefix):
+ return label.name.replace(label_prefix, "").strip()
+ return issue_type
+
+
+def print_changelog(sections):
+ for section, lines in sections.items():
+ print(section)
+ print('"' * len(section))
+ for line in lines:
+ print('-', line)
+ print()
+
+
+@click.group()
+def cli():
+ r"""
+ This tool should be used by Airflow Release Manager to verify what Github issue's
+ were merged in the current working branch.
+
+ airflow-github compare <target_version> <github_token>
+ """
+
+
+@cli.command(short_help='Compare a Github target version against git merges')
+@click.argument('target_version')
+@click.argument('github-token', envvar='GITHUB_TOKEN')
+@click.option('--previous-version',
+ 'previous_version',
+ help="Specify the previous tag on the working branch to limit"
+ " searching for few commits to find the cherry-picked commits")
+@click.option('--unmerged', 'show_uncherrypicked_only', help="Show unmerged issues only", is_flag=True)
+def compare(target_version, github_token, previous_version=None, show_uncherrypicked_only=False):
+ repo = git.Repo(".", search_parent_directories=True)
+ commits_to_current_branch = get_commits_to_current_branch(
+ repo, previous_version)
+
+ github_handler = Github(github_token)
+ milestone_issues = list(github_handler.search_issues(
+ f"repo:apache/airflow milestone:\"Airflow {target_version}\""))
+
+ num_cherrypicked = 0
+ num_uncherrypicked = Counter()
+
+ # :<18 says left align, pad to 18
+ # :<50.50 truncates after 50 chars
+ # !s forces as string
+ formatstr = "{id:<8}|{typ!s:<15}|{status!s}|{description:<83.83}|{merged:<6}|{commit:>9.7}"
+
+ print(formatstr.format(
+ id="ISSUE",
+ typ="TYPE",
+ status="STATUS".ljust(10),
+ description="DESCRIPTION",
+ merged="MERGED",
+ commit="COMMIT"))
+
+ for issue in milestone_issues:
+ commit = None
+ for event in issue.get_events():
+ # Checks if event is a commit getting merged into master.
+ if event.event == 'merged':
+ commit = event.commit_id
Review comment:
This loop is time-consuming, takes a good amount of time on my machine to load all commits.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on a change in pull request #9270: Add airflow GitHub script
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #9270:
URL: https://github.com/apache/airflow/pull/9270#discussion_r439772130
##########
File path: dev/airflow-github
##########
@@ -0,0 +1,218 @@
+#!/usr/bin/env python3
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This tool is based on the Spark merge_spark_pr script:
+# https://github.com/apache/spark/blob/master/dev/merge_spark_pr.py
+
+from collections import defaultdict, Counter
+
+import re
+import sys
+from github import Github
+
+GIT_COMMIT_FIELDS = ['id', 'author_name',
+ 'author_email', 'date', 'subject', 'body']
+GIT_LOG_FORMAT = '%x1f'.join(['%h', '%an', '%ae', '%ad', '%s', '%b']) + '%x1e'
+pr_title_re = re.compile(r".*\((#[0-9]{1,6})\)$")
+
+try:
+ import click
+except ImportError:
+ print("Could not find the click library. Run 'sudo pip install click' to install.")
+ sys.exit(-1)
+
+try:
+ import git
+except ImportError:
+ print("Could not import git. Run 'sudo pip install gitpython' to install")
+ sys.exit(-1)
+
+STATUS_COLOR_MAP = {
+ 'Resolved': 'green',
+ 'Open': 'red',
+}
+
+DEFAULT_SECTION_NAME = 'Uncategorized'
+
+def get_commits_to_current_branch(repo, previous_version=None):
+ log_args = ['--format="%H"']
+ if previous_version:
+ log_args.append(previous_version + "..")
+
+ log = repo.git.log(*log_args)
+ return set(log.strip('"').split('"\n"'))
+
+
+def get_commits_between_tags(repo, earlier_tag, later_tag):
+ log_args = ['--format="%H"', earlier_tag + ".." + later_tag]
+ log = repo.git.log(*log_args)
+ return list(log.strip('"').split('"\n"'))
+
+
+def get_issue_status(issue):
+ status = issue.state.capitalize()
+ if status == 'Closed':
+ return 'Resolved'
+ return status
+
+
+def style_issue_status(status):
+ if status in STATUS_COLOR_MAP:
+ return click.style(status[:10].ljust(10), STATUS_COLOR_MAP[status])
+ return status[:10].ljust(10)
+
+
+def get_issue_type(issue):
+ label_prefix = "type:"
+ issue_type = DEFAULT_SECTION_NAME
+ if issue.labels:
+ for label in issue.labels:
+ if label.name.startswith(label_prefix):
+ return label.name.replace(label_prefix, "").strip()
+ return issue_type
+
+
+def print_changelog(sections):
+ for section, lines in sections.items():
+ print(section)
+ print('"' * len(section))
+ for line in lines:
+ print('-', line)
+ print()
+
+
+@click.group()
+def cli():
+ r"""
+ This tool should be used by Airflow Release Manager to verify what Github issue's
+ were merged in the current working branch.
+
+ airflow-github compare <target_version> <github_token>
+ """
+
+
+@cli.command(short_help='Compare a Github target version against git merges')
+@click.argument('target_version')
+@click.argument('github-token', envvar='GITHUB_TOKEN')
+@click.option('--previous-version',
+ 'previous_version',
+ help="Specify the previous tag on the working branch to limit"
+ " searching for few commits to find the cherry-picked commits")
+@click.option('--unmerged', 'show_uncherrypicked_only', help="Show unmerged issues only", is_flag=True)
+def compare(target_version, github_token, previous_version=None, show_uncherrypicked_only=False):
+ repo = git.Repo(".", search_parent_directories=True)
+ commits_to_current_branch = get_commits_to_current_branch(
+ repo, previous_version)
+
+ github_handler = Github(github_token)
+ milestone_issues = list(github_handler.search_issues(
+ f"repo:apache/airflow milestone:\"Airflow {target_version}\""))
+
+ num_cherrypicked = 0
+ num_uncherrypicked = Counter()
+
+ # :<18 says left align, pad to 18
+ # :<50.50 truncates after 50 chars
+ # !s forces as string
+ formatstr = "{id:<8}|{typ!s:<15}|{status!s}|{description:<83.83}|{merged:<6}|{commit:>9.7}"
+
+ print(formatstr.format(
+ id="ISSUE",
+ typ="TYPE",
+ status="STATUS".ljust(10),
+ description="DESCRIPTION",
+ merged="MERGED",
+ commit="COMMIT"))
+
+ for issue in milestone_issues:
+ commit = None
+ for event in issue.get_events():
+ # Checks if event is a commit getting merged into master.
+ if event.event == 'merged':
+ commit = event.commit_id
+ if not commit:
+ continue
Review comment:
Because of this the PRs/Issues that are not merged yet won't show in the list
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on a change in pull request #9270: Add airflow GitHub script
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #9270:
URL: https://github.com/apache/airflow/pull/9270#discussion_r439772154
##########
File path: dev/airflow-github
##########
@@ -0,0 +1,218 @@
+#!/usr/bin/env python3
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This tool is based on the Spark merge_spark_pr script:
+# https://github.com/apache/spark/blob/master/dev/merge_spark_pr.py
+
+from collections import defaultdict, Counter
+
+import re
+import sys
+from github import Github
+
+GIT_COMMIT_FIELDS = ['id', 'author_name',
+ 'author_email', 'date', 'subject', 'body']
+GIT_LOG_FORMAT = '%x1f'.join(['%h', '%an', '%ae', '%ad', '%s', '%b']) + '%x1e'
+pr_title_re = re.compile(r".*\((#[0-9]{1,6})\)$")
+
+try:
+ import click
+except ImportError:
+ print("Could not find the click library. Run 'sudo pip install click' to install.")
+ sys.exit(-1)
+
+try:
+ import git
+except ImportError:
+ print("Could not import git. Run 'sudo pip install gitpython' to install")
+ sys.exit(-1)
+
+STATUS_COLOR_MAP = {
+ 'Resolved': 'green',
+ 'Open': 'red',
+}
+
+DEFAULT_SECTION_NAME = 'Uncategorized'
+
+def get_commits_to_current_branch(repo, previous_version=None):
+ log_args = ['--format="%H"']
+ if previous_version:
+ log_args.append(previous_version + "..")
+
+ log = repo.git.log(*log_args)
+ return set(log.strip('"').split('"\n"'))
+
+
+def get_commits_between_tags(repo, earlier_tag, later_tag):
+ log_args = ['--format="%H"', earlier_tag + ".." + later_tag]
+ log = repo.git.log(*log_args)
+ return list(log.strip('"').split('"\n"'))
+
+
+def get_issue_status(issue):
+ status = issue.state.capitalize()
+ if status == 'Closed':
+ return 'Resolved'
+ return status
+
+
+def style_issue_status(status):
+ if status in STATUS_COLOR_MAP:
+ return click.style(status[:10].ljust(10), STATUS_COLOR_MAP[status])
+ return status[:10].ljust(10)
+
+
+def get_issue_type(issue):
+ label_prefix = "type:"
+ issue_type = DEFAULT_SECTION_NAME
+ if issue.labels:
+ for label in issue.labels:
+ if label.name.startswith(label_prefix):
+ return label.name.replace(label_prefix, "").strip()
+ return issue_type
+
+
+def print_changelog(sections):
+ for section, lines in sections.items():
+ print(section)
+ print('"' * len(section))
+ for line in lines:
+ print('-', line)
+ print()
+
+
+@click.group()
+def cli():
+ r"""
+ This tool should be used by Airflow Release Manager to verify what Github issue's
+ were merged in the current working branch.
+
+ airflow-github compare <target_version> <github_token>
+ """
+
+
+@cli.command(short_help='Compare a Github target version against git merges')
+@click.argument('target_version')
+@click.argument('github-token', envvar='GITHUB_TOKEN')
+@click.option('--previous-version',
+ 'previous_version',
+ help="Specify the previous tag on the working branch to limit"
+ " searching for few commits to find the cherry-picked commits")
+@click.option('--unmerged', 'show_uncherrypicked_only', help="Show unmerged issues only", is_flag=True)
+def compare(target_version, github_token, previous_version=None, show_uncherrypicked_only=False):
+ repo = git.Repo(".", search_parent_directories=True)
+ commits_to_current_branch = get_commits_to_current_branch(
+ repo, previous_version)
+
+ github_handler = Github(github_token)
+ milestone_issues = list(github_handler.search_issues(
+ f"repo:apache/airflow milestone:\"Airflow {target_version}\""))
+
+ num_cherrypicked = 0
+ num_uncherrypicked = Counter()
+
+ # :<18 says left align, pad to 18
+ # :<50.50 truncates after 50 chars
+ # !s forces as string
+ formatstr = "{id:<8}|{typ!s:<15}|{status!s}|{description:<83.83}|{merged:<6}|{commit:>9.7}"
+
+ print(formatstr.format(
+ id="ISSUE",
+ typ="TYPE",
+ status="STATUS".ljust(10),
+ description="DESCRIPTION",
+ merged="MERGED",
+ commit="COMMIT"))
+
+ for issue in milestone_issues:
+ commit = None
+ for event in issue.get_events():
+ # Checks if event is a commit getting merged into master.
+ if event.event == 'merged':
+ commit = event.commit_id
Review comment:
I will push some improvements
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org