in gha_scanner/__init__.py [0:0]
def __init__(self, config):
self.config = config
self.ghurl = "https://api.github.com"
self.s = requests.Session()
self.mail_map = {}
raw_map = self.s.get(
"https://whimsy.apache.org/public/committee-info.json"
).json()["committees"]
[self.mail_map.update({item: raw_map[item]["mail_list"]}) for item in raw_map]
self.s.headers.update({"Authorization": "token %s" % self.config["gha_token"]})
self.pubsub = "https://pubsub.apache.org:2070/git/commit"
self.logger = Log(config)
self.message_foot = [
"\nFor more information on the GitHub Actions workflow policy, visit:",
"\thttps://infra.apache.org/github-actions-policy.html\n",
"Please remediate the above as soon as possible.",
"If after after 60 days these problems are not addressed, we will turn off builds",
"\nCheers,",
"\tASF Infrastructure",
]
d = datetime.datetime.now() + datetime.timedelta(
days=self.config["next_pester"]
)
self.msgcache = {"infrastructure": {"date": d}}