Skip to content

Reply - How To #140

@blackboxprogramming

Description

@blackboxprogramming

name: Issue Auto Reply

on:
issues:
types: [opened, labeled]

permissions:
issues: write
contents: read

jobs:
reply:
if: |
github.event.action == 'opened' ||
(github.event.action == 'labeled' && github.event.label.name == 'reply')
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
const body = [
👋 Hey @${issue.user.login}! I’m on it.,
, `**Title:** ${issue.title}`, `**Number:** #${issue.number}`, ,
Next steps:,
- Bot has acknowledged this.,
- If this needs code ingestion, add label \ingest` and paste code blocks., - If this needs ops, add label `ops` and set the title like `ops: issues:sync` or `ops: run:script tools/autopush.sh`.`
].join("\n");
await github.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions