mirror of
https://github.com/ansible/ansible-documentation.git
synced 2026-03-26 13:18:58 +07:00
labeler: retrieve author_association from event data
The Github Actions API token apparently doesn't have sufficient ACLs to retrieve this from the API. Fixes: https://github.com/ansible/ansible-documentation/issues/204
This commit is contained in:
@@ -160,8 +160,11 @@ def new_contributor_welcome(ctx: IssueOrPrCtx) -> None:
|
||||
# This contributor has already been welcomed!
|
||||
if "new_contributor" in ctx.previously_labeled:
|
||||
return
|
||||
log(ctx, "author_association is", ctx.member.raw_data["author_association"])
|
||||
if ctx.member.raw_data["author_association"] not in {
|
||||
author_association = ctx.event_member.get(
|
||||
"author_association", ctx.member.raw_data["author_association"]
|
||||
)
|
||||
log(ctx, "author_association is", author_association)
|
||||
if author_association not in {
|
||||
"FIRST_TIMER",
|
||||
"FIRST_TIME_CONTRIBUTOR",
|
||||
}:
|
||||
|
||||
Reference in New Issue
Block a user