Skip to content

Commit 6eb1c34

Browse files
authored
fix(infra): pr-title-labeler (#33313)
Wasn't working on `pull_request_target`
1 parent d390d2f commit 6eb1c34

File tree

7 files changed

+55
-51
lines changed

7 files changed

+55
-51
lines changed

.github/workflows/_compile_integration_test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# Runs pytest with compile marker to check syntax/imports.
88

9-
name: '🔗 Compile Integration Tests'
9+
name: "🔗 Compile Integration Tests"
1010

1111
on:
1212
workflow_call:
@@ -33,26 +33,26 @@ jobs:
3333
working-directory: ${{ inputs.working-directory }}
3434
runs-on: ubuntu-latest
3535
timeout-minutes: 20
36-
name: 'Python ${{ inputs.python-version }}'
36+
name: "Python ${{ inputs.python-version }}"
3737
steps:
3838
- uses: actions/checkout@v5
3939

40-
- name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
40+
- name: "🐍 Set up Python ${{ inputs.python-version }} + UV"
4141
uses: "./.github/actions/uv_setup"
4242
with:
4343
python-version: ${{ inputs.python-version }}
4444
cache-suffix: compile-integration-tests-${{ inputs.working-directory }}
4545
working-directory: ${{ inputs.working-directory }}
4646

47-
- name: '📦 Install Integration Dependencies'
47+
- name: "📦 Install Integration Dependencies"
4848
shell: bash
4949
run: uv sync --group test --group test_integration
5050

51-
- name: '🔗 Check Integration Tests Compile'
51+
- name: "🔗 Check Integration Tests Compile"
5252
shell: bash
5353
run: uv run pytest -m compile tests/integration_tests
5454

55-
- name: '🧹 Verify Clean Working Directory'
55+
- name: "🧹 Verify Clean Working Directory"
5656
shell: bash
5757
run: |
5858
set -eu

.github/workflows/_lint.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#
66
# Called as part of check_diffs.yml workflow.
77

8-
name: '🧹 Linting'
8+
name: "🧹 Linting"
99

1010
on:
1111
workflow_call:
@@ -33,43 +33,43 @@ env:
3333
jobs:
3434
# Linting job - runs quality checks on package and test code
3535
build:
36-
name: 'Python ${{ inputs.python-version }}'
36+
name: "Python ${{ inputs.python-version }}"
3737
runs-on: ubuntu-latest
3838
timeout-minutes: 20
3939
steps:
40-
- name: '📋 Checkout Code'
40+
- name: "📋 Checkout Code"
4141
uses: actions/checkout@v5
4242

43-
- name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
43+
- name: "🐍 Set up Python ${{ inputs.python-version }} + UV"
4444
uses: "./.github/actions/uv_setup"
4545
with:
4646
python-version: ${{ inputs.python-version }}
4747
cache-suffix: lint-${{ inputs.working-directory }}
4848
working-directory: ${{ inputs.working-directory }}
4949

50-
- name: '📦 Install Lint & Typing Dependencies'
50+
- name: "📦 Install Lint & Typing Dependencies"
5151
working-directory: ${{ inputs.working-directory }}
5252
run: |
5353
uv sync --group lint --group typing
5454
55-
- name: '🔍 Analyze Package Code with Linters'
55+
- name: "🔍 Analyze Package Code with Linters"
5656
working-directory: ${{ inputs.working-directory }}
5757
run: |
5858
make lint_package
5959
60-
- name: '📦 Install Test Dependencies (non-partners)'
60+
- name: "📦 Install Test Dependencies (non-partners)"
6161
# (For directories NOT starting with libs/partners/)
6262
if: ${{ ! startsWith(inputs.working-directory, 'libs/partners/') }}
6363
working-directory: ${{ inputs.working-directory }}
6464
run: |
6565
uv sync --inexact --group test
66-
- name: '📦 Install Test Dependencies'
66+
- name: "📦 Install Test Dependencies"
6767
if: ${{ startsWith(inputs.working-directory, 'libs/partners/') }}
6868
working-directory: ${{ inputs.working-directory }}
6969
run: |
7070
uv sync --inexact --group test --group test_integration
7171
72-
- name: '🔍 Analyze Test Code with Linters'
72+
- name: "🔍 Analyze Test Code with Linters"
7373
working-directory: ${{ inputs.working-directory }}
7474
run: |
7575
make lint_tests

.github/workflows/_test.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Runs unit tests with both current and minimum supported dependency versions
22
# to ensure compatibility across the supported range.
33

4-
name: '🧪 Unit Testing'
4+
name: "🧪 Unit Testing"
55

66
on:
77
workflow_call:
@@ -30,29 +30,29 @@ jobs:
3030
working-directory: ${{ inputs.working-directory }}
3131
runs-on: ubuntu-latest
3232
timeout-minutes: 20
33-
name: 'Python ${{ inputs.python-version }}'
33+
name: "Python ${{ inputs.python-version }}"
3434
steps:
35-
- name: '📋 Checkout Code'
35+
- name: "📋 Checkout Code"
3636
uses: actions/checkout@v5
3737

38-
- name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
38+
- name: "🐍 Set up Python ${{ inputs.python-version }} + UV"
3939
uses: "./.github/actions/uv_setup"
4040
id: setup-python
4141
with:
4242
python-version: ${{ inputs.python-version }}
4343
cache-suffix: test-${{ inputs.working-directory }}
4444
working-directory: ${{ inputs.working-directory }}
4545

46-
- name: '📦 Install Test Dependencies'
46+
- name: "📦 Install Test Dependencies"
4747
shell: bash
4848
run: uv sync --group test --dev
4949

50-
- name: '🧪 Run Core Unit Tests'
50+
- name: "🧪 Run Core Unit Tests"
5151
shell: bash
5252
run: |
5353
make test
5454
55-
- name: '🔍 Calculate Minimum Dependency Versions'
55+
- name: "🔍 Calculate Minimum Dependency Versions"
5656
working-directory: ${{ inputs.working-directory }}
5757
id: min-version
5858
shell: bash
@@ -63,7 +63,7 @@ jobs:
6363
echo "min-versions=$min_versions" >> "$GITHUB_OUTPUT"
6464
echo "min-versions=$min_versions"
6565
66-
- name: '🧪 Run Tests with Minimum Dependencies'
66+
- name: "🧪 Run Tests with Minimum Dependencies"
6767
if: ${{ steps.min-version.outputs.min-versions != '' }}
6868
env:
6969
MIN_VERSIONS: ${{ steps.min-version.outputs.min-versions }}
@@ -72,7 +72,7 @@ jobs:
7272
make tests
7373
working-directory: ${{ inputs.working-directory }}
7474

75-
- name: '🧹 Verify Clean Working Directory'
75+
- name: "🧹 Verify Clean Working Directory"
7676
shell: bash
7777
run: |
7878
set -eu
@@ -83,4 +83,3 @@ jobs:
8383
# grep will exit non-zero if the target message isn't found,
8484
# and `set -e` above will cause the step to fail.
8585
echo "$STATUS" | grep 'nothing to commit, working tree clean'
86-

.github/workflows/_test_pydantic.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Facilitate unit testing against different Pydantic versions for a provided package.
22

3-
name: '🐍 Pydantic Version Testing'
3+
name: "🐍 Pydantic Version Testing"
44

55
on:
66
workflow_call:
@@ -33,32 +33,32 @@ jobs:
3333
working-directory: ${{ inputs.working-directory }}
3434
runs-on: ubuntu-latest
3535
timeout-minutes: 20
36-
name: 'Pydantic ~=${{ inputs.pydantic-version }}'
36+
name: "Pydantic ~=${{ inputs.pydantic-version }}"
3737
steps:
38-
- name: '📋 Checkout Code'
38+
- name: "📋 Checkout Code"
3939
uses: actions/checkout@v5
4040

41-
- name: '🐍 Set up Python ${{ inputs.python-version }} + UV'
41+
- name: "🐍 Set up Python ${{ inputs.python-version }} + UV"
4242
uses: "./.github/actions/uv_setup"
4343
with:
4444
python-version: ${{ inputs.python-version }}
4545
cache-suffix: test-pydantic-${{ inputs.working-directory }}
4646
working-directory: ${{ inputs.working-directory }}
4747

48-
- name: '📦 Install Test Dependencies'
48+
- name: "📦 Install Test Dependencies"
4949
shell: bash
5050
run: uv sync --group test
5151

52-
- name: '🔄 Install Specific Pydantic Version'
52+
- name: "🔄 Install Specific Pydantic Version"
5353
shell: bash
5454
run: VIRTUAL_ENV=.venv uv pip install pydantic~=${{ inputs.pydantic-version }}
5555

56-
- name: '🧪 Run Core Tests'
56+
- name: "🧪 Run Core Tests"
5757
shell: bash
5858
run: |
5959
make test
6060
61-
- name: '🧹 Verify Clean Working Directory'
61+
- name: "🧹 Verify Clean Working Directory"
6262
shell: bash
6363
run: |
6464
set -eu

.github/workflows/check_core_versions.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
#
33
# (Prevents releases with mismatched version numbers)
44

5-
name: '🔍 Check Version Equality'
5+
name: "🔍 Check Version Equality"
66

77
on:
88
pull_request:
99
paths:
10-
- 'libs/core/pyproject.toml'
11-
- 'libs/core/langchain_core/version.py'
10+
- "libs/core/pyproject.toml"
11+
- "libs/core/langchain_core/version.py"
1212

1313
permissions:
1414
contents: read
@@ -20,7 +20,7 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v5
2222

23-
- name: '✅ Verify pyproject.toml & version.py Match'
23+
- name: "✅ Verify pyproject.toml & version.py Match"
2424
run: |
2525
# Check core versions
2626
CORE_PYPROJECT_VERSION=$(grep -Po '(?<=^version = ")[^"]*' libs/core/pyproject.toml)

.github/workflows/pr_labeler_file.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ on:
1212

1313
jobs:
1414
labeler:
15-
name: 'label'
15+
name: "label"
1616
permissions:
1717
contents: read
1818
pull-requests: write
1919
issues: write
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- name: Label Pull Request
24-
uses: actions/labeler@v6
25-
with:
26-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
27-
configuration-path: .github/pr-file-labeler.yml
28-
sync-labels: false
23+
- name: Label Pull Request
24+
uses: actions/labeler@v6
25+
with:
26+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
27+
configuration-path: .github/pr-file-labeler.yml
28+
sync-labels: false

.github/workflows/pr_labeler_title.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,22 @@ on:
1212

1313
jobs:
1414
pr-title-labeler:
15-
name: 'label'
15+
name: "label"
1616
permissions:
1717
contents: read
1818
pull-requests: write
1919
issues: write
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- name: Label PR based on title
24-
# Archived repo; latest commit (v0.1.0)
25-
uses: grafana/pr-labeler-action@f19222d3ef883d2ca5f04420fdfe8148003763f0
26-
with:
27-
token: ${{ secrets.GITHUB_TOKEN }}
28-
configuration-path: .github/pr-title-labeler.yml
23+
- name: Checkout repository
24+
uses: actions/checkout@v5
25+
with:
26+
ref: ${{ github.event.pull_request.base.ref }}
27+
28+
- name: Label PR based on title
29+
# Archived repo; latest commit (v0.1.0)
30+
uses: grafana/pr-labeler-action@f19222d3ef883d2ca5f04420fdfe8148003763f0
31+
with:
32+
token: ${{ secrets.GITHUB_TOKEN }}
33+
configuration-path: .github/pr-title-labeler.yml

0 commit comments

Comments
 (0)