Files
langchain/.github/workflows/pr_labeler.yml
dependabot[bot] 20afcbb2d5 chore: bump the minor-and-patch group with 2 updates (#37512)
Bumps the minor-and-patch group with 2 updates:
[actions/create-github-app-token](https://github.com/actions/create-github-app-token)
and
[aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials).

Updates `actions/create-github-app-token` from 3.1.1 to 3.2.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/create-github-app-token/releases">actions/create-github-app-token's
releases</a>.</em></p>
<blockquote>
<h2>v3.2.0</h2>
<h2><a
href="https://github.com/actions/create-github-app-token/compare/v3.1.1...v3.2.0">3.2.0</a>
(2026-05-12)</h2>
<h3>Features</h3>
<ul>
<li>add support for enterprise-level GitHub Apps (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/263">#263</a>)
(<a
href="952a2a7073">952a2a7</a>)</li>
<li>support full repository names in <code>repositories</code> input (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/372">#372</a>)
(<a
href="85eb8dd414">85eb8dd</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> bump <code>@​actions/core</code> from 3.0.0
to 3.0.1 in the production-dependencies group (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/364">#364</a>)
(<a
href="43e5c345bf">43e5c34</a>)</li>
<li>validate private-key input (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/376">#376</a>)
(<a
href="f24bbd8964">f24bbd8</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/create-github-app-token/blob/main/CHANGELOG.md">actions/create-github-app-token's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2><a
href="https://github.com/actions/create-github-app-token/compare/v3.1.1...v3.2.0">3.2.0</a>
(2026-05-12)</h2>
<h3>Features</h3>
<ul>
<li>add support for enterprise-level GitHub Apps (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/263">#263</a>)
(<a
href="952a2a7073">952a2a7</a>)</li>
<li>support full repository names in <code>repositories</code> input (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/372">#372</a>)
(<a
href="85eb8dd414">85eb8dd</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> bump <code>@​actions/core</code> from 3.0.0
to 3.0.1 in the production-dependencies group (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/364">#364</a>)
(<a
href="43e5c345bf">43e5c34</a>)</li>
<li>validate private-key input (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/376">#376</a>)
(<a
href="f24bbd8964">f24bbd8</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bcd2ba4921"><code>bcd2ba4</code></a>
chore(main): release 3.2.0 (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/370">#370</a>)</li>
<li><a
href="f24bbd8964"><code>f24bbd8</code></a>
fix: validate private-key input (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/376">#376</a>)</li>
<li><a
href="363531b6d9"><code>363531b</code></a>
docs: capitalize Git as a proper noun in README (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/374">#374</a>)</li>
<li><a
href="fd2801133e"><code>fd28011</code></a>
docs: update procedure to configure Git (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/287">#287</a>)</li>
<li><a
href="85eb8dd414"><code>85eb8dd</code></a>
feat: support full repository names in <code>repositories</code> input
(<a
href="https://redirect.github.com/actions/create-github-app-token/issues/372">#372</a>)</li>
<li><a
href="c9aabb8372"><code>c9aabb8</code></a>
build(deps-dev): bump yaml from 2.8.3 to 2.8.4 in the
development-dependencie...</li>
<li><a
href="e02e816e55"><code>e02e816</code></a>
build(deps-dev): bump undici from 7.24.6 to 8.2.0 (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/366">#366</a>)</li>
<li><a
href="8d835bfd37"><code>8d835bf</code></a>
build(deps-dev): bump esbuild from 0.27.4 to 0.28.0 in the
development-depend...</li>
<li><a
href="952a2a7073"><code>952a2a7</code></a>
feat: add support for enterprise-level GitHub Apps (<a
href="https://redirect.github.com/actions/create-github-app-token/issues/263">#263</a>)</li>
<li><a
href="43e5c345bf"><code>43e5c34</code></a>
fix(deps): bump <code>@​actions/core</code> from 3.0.0 to 3.0.1 in the
production-dependenc...</li>
<li>Additional commits viewable in <a
href="1b10c78c78...bcd2ba4921">compare
view</a></li>
</ul>
</details>
<br />

Updates `aws-actions/configure-aws-credentials` from 6.1.0 to 6.1.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/aws-actions/configure-aws-credentials/releases">aws-actions/configure-aws-credentials's
releases</a>.</em></p>
<blockquote>
<h2>v6.1.1</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(deps-dev): bump esbuild from 0.27.4 to 0.28.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1722">aws-actions/configure-aws-credentials#1722</a></li>
<li>chore(deps-dev): bump <code>@​types/node</code> from 25.5.0 to
25.5.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1723">aws-actions/configure-aws-credentials#1723</a></li>
<li>chore(deps-dev): bump <code>@​smithy/property-provider</code> from
4.2.12 to 4.2.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1724">aws-actions/configure-aws-credentials#1724</a></li>
<li>chore(deps): bump proxy-agent from 8.0.0 to 8.0.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1726">aws-actions/configure-aws-credentials#1726</a></li>
<li>chore(deps): bump <code>@​smithy/node-http-handler</code> from 4.5.1
to 4.5.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1725">aws-actions/configure-aws-credentials#1725</a></li>
<li>chore(deps): bump <code>@​aws-sdk/client-sts</code> from 3.1020.0 to
3.1025.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1727">aws-actions/configure-aws-credentials#1727</a></li>
<li>chore(deps): bump basic-ftp from 5.2.0 to 5.2.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1728">aws-actions/configure-aws-credentials#1728</a></li>
<li>chore(deps): bump basic-ftp from 5.2.1 to 5.2.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1729">aws-actions/configure-aws-credentials#1729</a></li>
<li>chore(deps-dev): bump <code>@​types/node</code> from 25.5.2 to
25.6.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1730">aws-actions/configure-aws-credentials#1730</a></li>
<li>chore(deps-dev): bump <code>@​aws-sdk/credential-provider-env</code>
from 3.972.24 to 3.972.25 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1733">aws-actions/configure-aws-credentials#1733</a></li>
<li>chore(deps): bump <code>@​aws-sdk/client-sts</code> from 3.1025.0 to
3.1030.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1732">aws-actions/configure-aws-credentials#1732</a></li>
<li>chore(deps-dev): bump <code>@​biomejs/biome</code> from 2.4.10 to
2.4.11 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1734">aws-actions/configure-aws-credentials#1734</a></li>
<li>chore(deps): bump basic-ftp from 5.2.2 to 5.3.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1736">aws-actions/configure-aws-credentials#1736</a></li>
<li>chore(deps-dev): bump memfs from 4.57.1 to 4.57.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1737">aws-actions/configure-aws-credentials#1737</a></li>
<li>chore(deps-dev): bump typescript from 6.0.2 to 6.0.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1740">aws-actions/configure-aws-credentials#1740</a></li>
<li>chore(deps-dev): bump <code>@​smithy/property-provider</code> from
4.2.13 to 4.2.14 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1741">aws-actions/configure-aws-credentials#1741</a></li>
<li>chore(deps-dev): bump <code>@​aws-sdk/credential-provider-env</code>
from 3.972.25 to 3.972.28 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1742">aws-actions/configure-aws-credentials#1742</a></li>
<li>chore(deps): bump <code>@​aws-sdk/client-sts</code> from 3.1030.0 to
3.1033.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1743">aws-actions/configure-aws-credentials#1743</a></li>
<li>chore(deps-dev): bump <code>@​biomejs/biome</code> from 2.4.11 to
2.4.12 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1739">aws-actions/configure-aws-credentials#1739</a></li>
<li>chore(deps-dev): bump <code>@​biomejs/biome</code> from 2.4.12 to
2.4.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1747">aws-actions/configure-aws-credentials#1747</a></li>
<li>chore(deps): bump postcss from 8.5.6 to 8.5.12 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1752">aws-actions/configure-aws-credentials#1752</a></li>
<li>chore(deps): bump <code>@​smithy/node-http-handler</code> from 4.6.0
to 4.6.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1750">aws-actions/configure-aws-credentials#1750</a></li>
<li>chore(deps-dev): bump <code>@​aws-sdk/credential-provider-env</code>
from 3.972.28 to 3.972.32 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1751">aws-actions/configure-aws-credentials#1751</a></li>
<li>chore(deps): bump <code>@​aws-sdk/client-sts</code> from 3.1033.0 to
3.1038.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1749">aws-actions/configure-aws-credentials#1749</a></li>
<li>chore: release 6.1.1 by <a
href="https://github.com/lehmanmj"><code>@​lehmanmj</code></a> in <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1757">aws-actions/configure-aws-credentials#1757</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v6...v6.1.1">https://github.com/aws-actions/configure-aws-credentials/compare/v6...v6.1.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/aws-actions/configure-aws-credentials/blob/main/CHANGELOG.md">aws-actions/configure-aws-credentials's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this file.
See <a
href="https://github.com/conventional-changelog/standard-version">standard-version</a>
for commit guidelines.</p>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v6.1.0...v6.1.1">6.1.1</a>
(2026-05-05)</h2>
<h3>Miscellaneous Chores</h3>
<ul>
<li>various dependency updates</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v6.0.0...v6.1.0">6.1.0</a>
(2026-04-06)</h2>
<h3>Features</h3>
<ul>
<li>add skip cleanup option (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1716">#1716</a>)
(<a
href="11b1c58b24">11b1c58</a>),
closes <a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1545">#1545</a></li>
<li>Support usage of AWS Profiles (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1696">#1696</a>)
(<a
href="a7f0c828ac">a7f0c82</a>)</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.1.1...v6.0.0">6.0.0</a>
(2026-02-04)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>Update action to use node24 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1632">#1632</a>)
(<a
href="a7a2c1125c">a7a2c11</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>add support to define transitive tag keys (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1316">#1316</a>)
(<a
href="232435c0c0">232435c</a>)
(<a
href="930ebd9bca">930ebd9</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>properly output <code>aws-account-id</code> and
<code>authenticated-arn</code> when using role-chaining (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/pull/1633">#1633</a>)
(<a
href="7ceaf96edc">7ceaf96</a>)</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.1.0...v5.1.1">5.1.1</a>
(2025-11-24)</h2>
<h3>Miscellaneous Chores</h3>
<ul>
<li>release 5.1.1 (<a
href="56d6a583f0">56d6a58</a>)</li>
</ul>
<h2><a
href="https://github.com/aws-actions/configure-aws-credentials/compare/v5.0.0...v5.1.0">5.1.0</a>
(2025-10-06)</h2>
<h3>Features</h3>
<ul>
<li>Add global timeout support (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1487">#1487</a>)
(<a
href="1584b8b0e2">1584b8b</a>)</li>
<li>add no-proxy support (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1482">#1482</a>)
(<a
href="dde9b22a8e">dde9b22</a>)</li>
<li>Improve debug logging in retry logic (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1485">#1485</a>)
(<a
href="97ef425d73">97ef425</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d979d5b3a7"><code>d979d5b</code></a>
chore: release 6.1.1 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1757">#1757</a>)</li>
<li><a
href="d4a9acd8d3"><code>d4a9acd</code></a>
chore: Update dist</li>
<li><a
href="fc44f4ae40"><code>fc44f4a</code></a>
chore(deps): bump <code>@​aws-sdk/client-sts</code> from 3.1033.0 to
3.1038.0 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1749">#1749</a>)</li>
<li><a
href="0b8336f1ba"><code>0b8336f</code></a>
chore: Update dist</li>
<li><a
href="8c5bf33eed"><code>8c5bf33</code></a>
chore(deps-dev): bump <code>@​aws-sdk/credential-provider-env</code> (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1751">#1751</a>)</li>
<li><a
href="53df0c1c32"><code>53df0c1</code></a>
chore: Update dist</li>
<li><a
href="c2c55827d2"><code>c2c5582</code></a>
chore(deps): bump <code>@​smithy/node-http-handler</code> from 4.6.0 to
4.6.1 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1750">#1750</a>)</li>
<li><a
href="bd0031d7c3"><code>bd0031d</code></a>
chore(deps): bump postcss from 8.5.6 to 8.5.12 (<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1752">#1752</a>)</li>
<li><a
href="6ab499a698"><code>6ab499a</code></a>
chore(deps-dev): bump <code>@​biomejs/biome</code> from 2.4.12 to 2.4.13
(<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1747">#1747</a>)</li>
<li><a
href="bc94895858"><code>bc94895</code></a>
chore(deps-dev): bump <code>@​biomejs/biome</code> from 2.4.11 to 2.4.12
(<a
href="https://redirect.github.com/aws-actions/configure-aws-credentials/issues/1739">#1739</a>)</li>
<li>Additional commits viewable in <a
href="ec61189d14...d979d5b3a7">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-18 22:31:48 +00:00

214 lines
8.8 KiB
YAML

# Unified PR labeler — applies size, file-based, title-based, and
# contributor classification labels in a single sequential workflow.
#
# Consolidates pr_labeler_file.yml, pr_labeler_title.yml,
# pr_size_labeler.yml, and PR-handling from tag-external-contributions.yml
# into one workflow to eliminate race conditions from concurrent label
# mutations. tag-external-issues.yml remains active for issue-only
# labeling. Backfill lives in pr_labeler_backfill.yml.
#
# Config and shared logic live in .github/scripts/pr-labeler-config.json
# and .github/scripts/pr-labeler.js — update those when adding partners.
#
# Setup Requirements:
# 1. Create a GitHub App with permissions:
# - Repository: Pull requests (write)
# - Repository: Issues (write)
# - Organization: Members (read)
# 2. Install the app on your organization and this repository
# 3. Add these repository secrets:
# - ORG_MEMBERSHIP_APP_ID: Your app's ID
# - ORG_MEMBERSHIP_APP_PRIVATE_KEY: Your app's private key
#
# The GitHub App token is required to check private organization membership
# and to propagate label events to downstream workflows.
name: "🏷️ PR Labeler"
on:
# Safe since we're not checking out or running the PR's code.
# NEVER CHECK OUT UNTRUSTED CODE FROM A PR's HEAD IN A pull_request_target JOB.
# Doing so would allow attackers to execute arbitrary code in the context of your repository.
pull_request_target:
types: [opened, synchronize, reopened, edited]
permissions:
contents: read
concurrency:
# Separate opened events so external/tier labels are never lost to cancellation
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}-${{ github.event.action == 'opened' && 'opened' || 'update' }}
cancel-in-progress: ${{ github.event.action != 'opened' }}
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
steps:
# Checks out the BASE branch (safe for pull_request_target — never
# the PR head). Needed to load .github/scripts/pr-labeler*.
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Generate GitHub App token
if: github.event.action == 'opened'
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3
with:
app-id: ${{ secrets.ORG_MEMBERSHIP_APP_ID }}
private-key: ${{ secrets.ORG_MEMBERSHIP_APP_PRIVATE_KEY }}
- name: Verify App token
if: github.event.action == 'opened'
run: |
if [ -z "${{ steps.app-token.outputs.token }}" ]; then
echo "::error::GitHub App token generation failed — cannot classify contributor"
exit 1
fi
- name: Check org membership
if: github.event.action == 'opened'
id: check-membership
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const { owner, repo } = context.repo;
const { h } = require('./.github/scripts/pr-labeler.js').loadAndInit(github, owner, repo, core);
const author = context.payload.sender.login;
const { isExternal } = await h.checkMembership(
author, context.payload.sender.type,
);
core.setOutput('is-external', isExternal ? 'true' : 'false');
- name: Apply PR labels
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
IS_EXTERNAL: ${{ steps.check-membership.outputs.is-external }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { owner, repo } = context.repo;
const { h } = require('./.github/scripts/pr-labeler.js').loadAndInit(github, owner, repo, core);
const pr = context.payload.pull_request;
if (!pr) return;
const prNumber = pr.number;
const action = context.payload.action;
const toAdd = new Set();
const toRemove = new Set();
const currentLabels = (await github.paginate(
github.rest.issues.listLabelsOnIssue,
{ owner, repo, issue_number: prNumber, per_page: 100 },
)).map(l => l.name ?? '');
// ── Size + file labels (skip on 'edited' — files unchanged) ──
if (action !== 'edited') {
for (const sl of h.sizeLabels) await h.ensureLabel(sl);
const files = await github.paginate(github.rest.pulls.listFiles, {
owner, repo, pull_number: prNumber, per_page: 100,
});
const { totalChanged, sizeLabel } = h.computeSize(files);
toAdd.add(sizeLabel);
for (const sl of h.sizeLabels) {
if (currentLabels.includes(sl) && sl !== sizeLabel) toRemove.add(sl);
}
console.log(`Size: ${totalChanged} changed lines → ${sizeLabel}`);
for (const label of h.matchFileLabels(files)) {
toAdd.add(label);
}
}
// ── Title-based labels ──
const { labels: titleLabels, typeLabel } = h.matchTitleLabels(pr.title || '');
for (const label of titleLabels) toAdd.add(label);
// Remove stale type labels only when a type was detected
if (typeLabel) {
for (const tl of h.allTypeLabels) {
if (currentLabels.includes(tl) && !titleLabels.has(tl)) toRemove.add(tl);
}
}
// ── Internal label (only on open, non-external contributors) ──
// IS_EXTERNAL is empty string on non-opened events (step didn't
// run), so this guard is only true for opened + internal.
if (action === 'opened' && process.env.IS_EXTERNAL === 'false') {
toAdd.add('internal');
}
// ── Apply changes ──
// Ensure all labels we're about to add exist (addLabels returns
// 422 if any label in the batch is missing, which would prevent
// ALL labels from being applied).
for (const name of toAdd) {
await h.ensureLabel(name);
}
for (const name of toRemove) {
if (toAdd.has(name)) continue;
try {
await github.rest.issues.removeLabel({
owner, repo, issue_number: prNumber, name,
});
} catch (e) {
if (e.status !== 404) throw e;
}
}
const addList = [...toAdd];
if (addList.length > 0) {
await github.rest.issues.addLabels({
owner, repo, issue_number: prNumber, labels: addList,
});
}
const removed = [...toRemove].filter(r => !toAdd.has(r));
console.log(`PR #${prNumber}: +[${addList.join(', ')}] -[${removed.join(', ')}]`);
# Apply tier label BEFORE the external label so that
# "trusted-contributor" is already present when the "external" labeled
# event fires and triggers require_issue_link.yml.
- name: Apply contributor tier label
if: github.event.action == 'opened' && steps.check-membership.outputs.is-external == 'true'
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const { owner, repo } = context.repo;
const { h } = require('./.github/scripts/pr-labeler.js').loadAndInit(github, owner, repo, core);
const pr = context.payload.pull_request;
await h.applyTierLabel(pr.number, pr.user.login);
- name: Add external label
if: github.event.action == 'opened' && steps.check-membership.outputs.is-external == 'true'
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
# Use App token so the "labeled" event propagates to downstream
# workflows (e.g. require_issue_link.yml). Events created by the
# default GITHUB_TOKEN do not trigger additional workflow runs.
github-token: ${{ steps.app-token.outputs.token }}
script: |
const { owner, repo } = context.repo;
const prNumber = context.payload.pull_request.number;
const { h } = require('./.github/scripts/pr-labeler.js').loadAndInit(github, owner, repo, core);
await h.ensureLabel('external');
await github.rest.issues.addLabels({
owner, repo,
issue_number: prNumber,
labels: ['external'],
});
console.log(`Added 'external' label to PR #${prNumber}`);