diff --git a/.github/workflows/pr_helper.yml b/.github/workflows/pr_helper.yml
index 30eba719f776..54594957ffee 100644
--- a/.github/workflows/pr_helper.yml
+++ b/.github/workflows/pr_helper.yml
@@ -56,3 +56,15 @@ jobs:
repo: context.repo.repo,
body: '${{env.MESSAGE}}'
})
+
+ - name: Add labels for valid PR
+ if: env.IS_READY_FOR_MERGE == 'True'
+ uses: actions/github-script@v6
+ with:
+ script: |
+ github.rest.issues.addLabels({
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ labels: ['Ready to merge']
+ })
diff --git a/infra/pr_helper.py b/infra/pr_helper.py
index 37c378ab78f1..dca5ec5b9a83 100644
--- a/infra/pr_helper.py
+++ b/infra/pr_helper.py
@@ -75,7 +75,7 @@ def main():
pr_author = github.get_pr_author()
# Gets all modified projects path.
projects_path = github.get_projects_path()
- email = github.get_author_email()
+ verified, email = github.get_author_email()
for project_path in projects_path:
project_url = f'{GITHUB_URL}/{OWNER}/{REPO}/tree/{BRANCH}/{project_path}'
@@ -100,10 +100,13 @@ def main():
if email:
if is_known_contributor(content_dict, email):
# Checks if the email is verified.
- message += (
- f'{pr_author} is either the primary contact or is in the CCs list '
- f'of [{project_path}]({project_url}).
')
- continue
+ if verified:
+ message += (
+ f'{pr_author} (verified) is either the primary contact or '
+ f'is in the CCs list of [{project_path}]({project_url}).
')
+ continue
+ message += (f'{pr_author} is either the primary contact or '
+ f'is in the CCs list of [{project_path}]({project_url})')
# Checks the previous commits.
commit_sha = github.has_author_modified_project(project_path)