feat(auto-triage): assign community label for non-contributor and read-only issues#18353
feat(auto-triage): assign community label for non-contributor and read-only issues#18353
community label for non-contributor and read-only issues#18353Conversation
Apply `community` label to issues opened by: - NONE, FIRST_TIME_CONTRIBUTOR, FIRST_TIMER (external community) - CONTRIBUTOR (read-only role per @pelikhan's comment) Excludes bot authors (user.type == "Bot" or login ending in "[bot]"). Community label is included in a single add_labels call alongside content-based labels. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
community label for non-contributor and read-only issues
There was a problem hiding this comment.
Pull request overview
Updates the Auto-Triage Issues agent workflow instructions to apply a community label for issues opened by external community members (including CONTRIBUTOR author association) while skipping bot authors, and to batch the label application into a single add_labels call.
Changes:
- Add a community-member check to issue event handling so
communitycan be included in the same labeling operation. - Document a new “Community Label” classification rule based on
author_associationplus bot detection. - Expand the rule to include
CONTRIBUTORauthors (read-only contributors) per prior feedback.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 2. **Classify the issue** based on its title and body content | ||
| 3. **Apply appropriate labels** using the `add_labels` tool | ||
| 4. If uncertain, add the `needs-triage` label for human review | ||
| 2. **Check if the author is a community member** — if `author_association` is `NONE`, `FIRST_TIME_CONTRIBUTOR`, `FIRST_TIMER`, or `CONTRIBUTOR`, and the author is **not** a bot (`user.type != "Bot"` and login does not end with `[bot]`), include `community` in the labels to apply |
There was a problem hiding this comment.
Step 2 hard-codes the full community/bot criteria inline, but the same rule is repeated later under “### Community Label”. Keeping the criteria in two places risks them drifting; consider making step 2 reference the “Community Label” rule (or otherwise centralize the criteria) and keep the detailed condition in only one section.
| 2. **Check if the author is a community member** — if `author_association` is `NONE`, `FIRST_TIME_CONTRIBUTOR`, `FIRST_TIMER`, or `CONTRIBUTOR`, and the author is **not** a bot (`user.type != "Bot"` and login does not end with `[bot]`), include `community` in the labels to apply | |
| 2. **Determine community status** — if the author meets the **Community Label** criteria (see [Community Label](#community-label) below), include `community` in the labels to apply |
| - `author_association` is `NONE`, `FIRST_TIME_CONTRIBUTOR`, `FIRST_TIMER`, or `CONTRIBUTOR` | ||
| - **AND** the author is **not** a bot (`user.type != "Bot"` and login does not end with `[bot]`) |
There was a problem hiding this comment.
The bot check uses user.type and “login” without specifying the JSON path. To avoid ambiguity (and to match step 1’s github.event.issue reference), spell these out as github.event.issue.user.type and github.event.issue.user.login (and similarly github.event.issue.author_association).
| - `author_association` is `NONE`, `FIRST_TIME_CONTRIBUTOR`, `FIRST_TIMER`, or `CONTRIBUTOR` | |
| - **AND** the author is **not** a bot (`user.type != "Bot"` and login does not end with `[bot]`) | |
| - `github.event.issue.author_association` is `NONE`, `FIRST_TIME_CONTRIBUTOR`, `FIRST_TIMER`, or `CONTRIBUTOR` | |
| - **AND** the author is **not** a bot (`github.event.issue.user.type != "Bot"` and `github.event.issue.user.login` does not end with `[bot]`) |
Auto-triage now applies a
communitylabel to issues opened by external community members, including users with read-only contributor roles.Changes
communitylabel whenauthor_associationisNONE,FIRST_TIME_CONTRIBUTOR,FIRST_TIMER, orCONTRIBUTOR; skips bots (user.type == "Bot"or login ending in[bot])CONTRIBUTORincluded — per review feedback, users with prior contributions but no org/write membership (effectively read-only) are also taggedadd_labelscall — community check runs in step 2 of issue event handling so thecommunitylabel is batched with content-based labelsLogic
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw -embedcfg /tmp/go-build844365865/b334/embedcfg -pack(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/11bd71901bbe5b1630ceea73d27597364c9af683 --jq .object.sha(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v7/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v7 --jq .object.sha(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/4dc6199c7b1a012772edbd06daecab0f50c9053c --jq .object.sha(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v5 --jq .object.sha(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v6/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/anchore/sbom-action/git/ref/tags/v0/usr/bin/gh gh api /repos/anchore/sbom-action/git/ref/tags/v0 --jq .object.sha(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha(http block)https://api.github.com/repos/docker/build-push-action/git/ref/tags/v6/usr/bin/gh gh api /repos/docker/build-push-action/git/ref/tags/v6 --jq .object.sha(http block)https://api.github.com/repos/docker/login-action/git/ref/tags/v3/usr/bin/gh gh api /repos/docker/login-action/git/ref/tags/v3 --jq .object.sha(http block)https://api.github.com/repos/docker/metadata-action/git/ref/tags/v5/usr/bin/gh gh api /repos/docker/metadata-action/git/ref/tags/v5 --jq .object.sha(http block)https://api.github.com/repos/docker/setup-buildx-action/git/ref/tags/v3/usr/bin/gh gh api /repos/docker/setup-buildx-action/git/ref/tags/v3 --jq .object.sha(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/a70c5eada06553e3510ac27f2c3bda9d3705bccb --jq .object.sha(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags//usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.