mirror of
https://github.com/langchain-ai/docs.git
synced 2026-08-27 02:41:59 -04:00
0e7fba2d52
## Summary - Pin `ctriolo/action-create-linear-issue` to the immutable commit SHA for `v0.7` so the `LINEAR_API_KEY` is no longer exposed to a mutable third-party action tag. - Pass GitHub PR base refs/SHAs and workflow output values through environment variables before shell use. - Apply the same base-ref hardening to adjacent docs diff-check workflows to avoid the same pattern recurring. ## Corridor findings - Fixes https://app.corridor.dev/projects/86f45f70-3153-46d0-b0f6-5ec9dba1ace1/findings/eb002ea1-903e-4a2b-94a5-5ebc4b60bab2 - Fixes https://app.corridor.dev/projects/86f45f70-3153-46d0-b0f6-5ec9dba1ace1/findings/1bbe3c85-75f4-4ece-8c96-cd857c5be291 ## Validation - `ruby -e 'require \"yaml\"; Dir[\"/tmp/docs/.github/workflows/*.yml\"].each { |p| YAML.load_file(p) }; puts \"parsed workflows\"'` - `git diff --check` Co-authored-by: langsmith-fleet[bot] <langsmith-fleet[bot]@users.noreply.github.com>
41 lines
1.6 KiB
YAML
41 lines
1.6 KiB
YAML
---
|
|
name: Test Code Samples Linear Ticket
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Filed separately so PR runs of "Test Code Samples" do not show a skipped
|
|
# create-linear-ticket check on every pull request.
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Test Code Samples"]
|
|
types: [completed]
|
|
|
|
jobs:
|
|
create-linear-ticket:
|
|
if: >-
|
|
github.event.workflow_run.event == 'schedule' &&
|
|
(github.event.workflow_run.conclusion == 'failure' ||
|
|
github.event.workflow_run.conclusion == 'cancelled')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Create Linear issue
|
|
uses: ctriolo/action-create-linear-issue@699c7c2f0639181e0eaf5622d2987c6584f48a5a # v0.7
|
|
with:
|
|
linear-api-key: ${{ secrets.LINEAR_API_KEY }}
|
|
linear-team-key: ${{ vars.LINEAR_TEAM_KEY }}
|
|
linear-issue-title: >-
|
|
${{ github.event.workflow_run.conclusion == 'cancelled'
|
|
&& 'Weekly code samples test timed out'
|
|
|| 'Weekly code samples test failed' }}
|
|
linear-issue-description: |
|
|
The scheduled weekly test of all code samples in `src/code-samples/` did not complete successfully.
|
|
|
|
**Outcome:** ${{ github.event.workflow_run.conclusion == 'cancelled' && 'Timed out before all samples finished. Consider increasing the job timeout or optimizing slow samples.' || 'One or more code samples failed.' }}
|
|
|
|
**Workflow run:** ${{ github.event.workflow_run.html_url }}
|
|
|
|
Please investigate and fix the failing samples.
|
|
linear-attachment-url: ${{ github.event.workflow_run.html_url }}
|
|
linear-attachment-title: "Failed workflow run"
|