AnandInguva commented on code in PR #23931: URL: https://github.com/apache/beam/pull/23931#discussion_r1029952589
########## sdks/python/apache_beam/testing/analyzers/github_issues_utils.py: ########## @@ -0,0 +1,163 @@ +# +# 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. +# +import json +import logging +import os +from typing import List +from typing import Optional +from typing import Tuple + +import requests + +try: + _GITHUB_TOKEN = os.environ['GITHUB_TOKEN'] +except KeyError as e: + _GITHUB_TOKEN = None + logging.warning( + 'A Github Personal Access token is required ' + 'to create Github Issues.') + +_BEAM_REPO_OWNER = 'AnandInguva' +_BEAM_REPO_NAME = 'beam' +_HEADERS = { + "Authorization": 'token {}'.format(_GITHUB_TOKEN), + "Accept": "application/vnd.github+json" +} + +# Fill the GitHub issue description with the below variables. +_ISSUE_DESCRIPTION_HEADER = """ Review Comment: May be we could have a github action that periodically checks for GitHub issues tagged with `perf-alert`. maybe we could add assignees to the issue? This could be one solution of triaging. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
