xinbinhuang commented on a change in pull request #20:
URL: https://github.com/apache/airflow-ci-infra/pull/20#discussion_r624894663
##########
File path: lambdas/scale_out_runner/app.py
##########
@@ -101,12 +107,38 @@ def index():
return payload
-def commiters(ssm_repo_name: str = os.getenv('SSM_REPO_NAME',
'apache/airflow')):
[email protected](Rate(1, unit=Rate.DAYS))
+def sync_committers(_):
+ app.log.info("Parsing committers list from %s", GITHUB_CI_YML)
+ resp = requests.get(GITHUB_CI_YML)
+ ci_yml = yaml.load(resp.text, yaml.SafeLoader)
+ runs_on = ci_yml['jobs']['build-info']['runs-on'].replace("\n", '')
+ committers = re.findall(r"fromJSON\('(\[.*\])'\)", runs_on)[0]
+
+ client = boto3.client('ssm')
+ param_path = get_ssm_param_path(SSM_REPO_NAME)
+
+ app.log.info("Updating config overlay for %s", param_path)
+ ssm_value = {"pullRequestSecurity": {"allowedAuthors": committers}}
Review comment:
I guess this part based on the func `commiters()`. Will refactor this
with `committers()` if you can confirm this's the right SSM value.
--
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:
[email protected]