-
Notifications
You must be signed in to change notification settings - Fork 0
“Ingest” Issues reply with links to the PR #142
Copy link
Copy link
Open
Description
name: Ingest Reply with PR Link
on:
pull_request:
types: [opened]
permissions:
pull-requests: read
issues: write
jobs:
reply-link:
if: startsWith(github.head_ref, 'auto/ingest-')
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
// Try to extract the issue number from branch name: auto/ingest-123
const m = pr.head.ref.match(/^auto/ingest-(\d+)$/);
if (!m) return;
const issue_number = Number(m[1]);
const url = pr.html_url;
await github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number,
body: 🔗 PR opened: ${url}\nMerge will bring files to \main`.`
});
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels