Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add workflow_dispatch with discussion_number input to dev.md
- Added workflow_dispatch trigger with discussion_number input
- Added target: "*" to add-comment to allow specifying discussion number
- Updated prompt to use github.event.inputs.discussion_number or github.event.discussion.number
- Added github.event.discussion.number to allowed expressions in constants
- Workflow now supports manual dispatch with custom discussion number
- All tests pass successfully

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
  • Loading branch information
Copilot and pelikhan committed Oct 11, 2025
commit 2bcea2d4f99a5b4469b49b7fbe78eef49ea3883c
23 changes: 14 additions & 9 deletions .github/workflows/dev.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion .github/workflows/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
types: [created]
discussion_comment:
types: [created]
workflow_dispatch:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot add discussion created and discussion comment created events.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Added discussion and discussion_comment events to the schema with their respective event types:

discussion: created, edited, deleted, transferred, pinned, unpinned, labeled, unlabeled, locked, unlocked, category_changed, answered, unanswered

discussion_comment: created, edited, deleted

Updated dev.md to trigger on both discussion and discussion_comment created events. The workflow now demonstrates commenting on discussions when they are created or when comments are added.

Commit: a0e2d76

inputs:
discussion_number:
description: "Discussion number to add comment to"
required: true
type: string
name: Dev
engine: codex
permissions:
Expand All @@ -18,6 +24,7 @@ tools:
safe-outputs:
staged: true
add-comment:
target: "*"
---

Write a delightful poem about the last 3 pull requests and add it as a comment to the discussion.
Write a delightful poem about the last 3 pull requests and add it as a comment to discussion #${{ github.event.inputs.discussion_number || github.event.discussion.number }}.
1 change: 1 addition & 0 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ var AllowedExpressions = []string{
"github.event.comment.id",
"github.event.deployment.id",
"github.event.deployment_status.id",
"github.event.discussion.number",
"github.event.head_commit.id",
"github.event.installation.id",
"github.event.issue.number",
Expand Down
Loading