Skip to content

Commit 29e06bb

Browse files
committed
debug: workflow_dispatch inputs
1 parent 85fc660 commit 29e06bb

File tree

1 file changed

+41
-12
lines changed

1 file changed

+41
-12
lines changed

.github/workflows/devin_validate_chain_request.yml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,44 @@ name: Trigger Devin for New Chain Request Validation
33
on:
44
issues:
55
types: [labeled]
6+
workflow_dispatch:
7+
inputs:
8+
issue_number:
9+
description: "Issue number for debugging"
10+
required: true
11+
type: string
12+
issue_title:
13+
description: "Issue title for debugging"
14+
required: true
15+
type: string
16+
issue_url:
17+
description: "Issue URL for debugging"
18+
required: true
19+
type: string
20+
issue_author:
21+
description: "Issue author username for debugging"
22+
required: true
23+
type: string
24+
issue_body:
25+
description: "Issue body content for debugging"
26+
required: true
27+
type: string
28+
label_name:
29+
description: 'Label name for debugging (should be "type: new chain request")'
30+
required: true
31+
type: string
32+
default: "type: new chain request"
633

734
permissions:
835
contents: read # Required to read issue content
936
issues: read # Required to read issue details
1037

1138
jobs:
1239
trigger-devin-chain-validation:
13-
# This job runs only if the issue was labeled with 'type: new chain request'
40+
# This job runs only if the issue was labeled with 'type: new chain request' OR if manually triggered
1441
if: |
15-
github.event.label.name == 'type: new chain request'
42+
github.event.label.name == 'type: new chain request' ||
43+
(github.event_name == 'workflow_dispatch' && inputs.label_name == 'type: new chain request')
1644
runs-on: ubuntu-latest
1745
steps:
1846
- name: Send Slack Notification for Chain Request Validation
@@ -22,15 +50,15 @@ jobs:
2250
PROMPT_TEXT: |
2351
## Context
2452
25-
A new issue (#${{ github.event.issue.number }}) has been labeled with "type: new chain request" in the ${{ github.repository }} repository. Your task is to validate this chain request for completeness and take appropriate action.
53+
A new issue (#${{ github.event_name == 'workflow_dispatch' && inputs.issue_number || github.event.issue.number }}) has been labeled with "type: new chain request" in the ${{ github.repository }} repository. Your task is to validate this chain request for completeness and take appropriate action.
2654
2755
**Issue Details:**
28-
- **Title**: ${{ github.event.issue.title }}
29-
- **URL**: ${{ github.event.issue.html_url }}
30-
- **Author**: ${{ github.event.issue.user.login }}
56+
- **Title**: ${{ github.event_name == 'workflow_dispatch' && inputs.issue_title || github.event.issue.title }}
57+
- **URL**: ${{ github.event_name == 'workflow_dispatch' && inputs.issue_url || github.event.issue.html_url }}
58+
- **Author**: ${{ github.event_name == 'workflow_dispatch' && inputs.issue_author || github.event.issue.user.login }}
3159
3260
**Issue Body:**
33-
${{ github.event.issue.body }}
61+
${{ github.event_name == 'workflow_dispatch' && inputs.issue_body || github.event.issue.body }}
3462
3563
## Validation Requirements
3664
@@ -67,7 +95,7 @@ jobs:
6795
* ${{ github.repository }} (for commenting on the issue if needed)
6896
* reown-com/web-monorepo (for creating the PR if request is valid)
6997
70-
Please proceed with validating issue #${{ github.event.issue.number }} and take the appropriate action based on your assessment.
98+
Please proceed with validating issue #${{ github.event_name == 'workflow_dispatch' && inputs.issue_number || github.event.issue.number }} and take the appropriate action based on your assessment.
7199
run: |
72100
# Exit on error
73101
set -e
@@ -100,10 +128,11 @@ jobs:
100128
echo "Sending Slack notification for Chain Request Validation."
101129
# Echo context information using direct GitHub context expressions for clarity and consistency.
102130
echo "Repository: ${{ github.repository }}"
103-
echo "Issue Number: #${{ github.event.issue.number }}"
104-
echo "Issue Title: ${{ github.event.issue.title }}"
105-
echo "Issue URL: ${{ github.event.issue.html_url }}"
106-
echo "Label Added: ${{ github.event.label.name }}"
131+
echo "Issue Number: #${{ github.event_name == 'workflow_dispatch' && inputs.issue_number || github.event.issue.number }}"
132+
echo "Issue Title: ${{ github.event_name == 'workflow_dispatch' && inputs.issue_title || github.event.issue.title }}"
133+
echo "Issue URL: ${{ github.event_name == 'workflow_dispatch' && inputs.issue_url || github.event.issue.html_url }}"
134+
echo "Label Added: ${{ github.event_name == 'workflow_dispatch' && inputs.label_name || github.event.label.name }}"
135+
echo "Trigger Type: ${{ github.event_name }}"
107136
108137
# Send the notification to Slack using curl.
109138
# -s: silent mode (no progress meter).

0 commit comments

Comments
 (0)