1717# /
1818
1919# Workflow name:
20- name : scaffold_package_via_rfc_issue_comment
20+ name : scaffold_package
2121
2222# Workflow triggers:
2323on :
24- issue_comment :
25- types : [created]
24+ # Allow the workflow to be triggered by other workflows
25+ workflow_call :
26+ # Define the secrets accessible by the workflow:
27+ secrets :
28+ PULL_REQUEST_TOKEN :
29+ description : ' GitHub token for stdlb-bot'
30+ required : true
31+ GITHUB_TOKEN :
32+ description : ' GitHub token used in the scaffold package action'
33+ required : true
34+ OPENAI_API_KEY :
35+ description : ' OpenAI API key for scaffold package action'
36+ required : true
2637
2738# Global permissions:
2839permissions :
@@ -41,22 +52,13 @@ jobs:
4152
4253 # Define the sequence of job steps...
4354 steps :
44- # Exit if comment does not contain scaffolding directive:
45- - name : ' Exit if comment does not contain scaffolding directive'
46- if : ${{ !contains(github.event.comment.body, 'scaffold') }}
47- run : |
48- echo "Comment does not contain scaffolding directive. Exiting..."
49- exit 0
50-
5155 # Checkout the current branch:
5256 - name : ' Checkout current branch'
5357 # Pin action to full length commit SHA
5458 uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
55- if : ${{ contains(github.event.comment.body, 'scaffold') }}
5659
5760 # Run the command to scaffold a package:
5861 - name : ' Scaffold package'
59- if : ${{ contains(github.event.comment.body, 'scaffold') }}
6062 id : scaffold
6163 # Pin action to full length commit SHA
6264 uses : stdlib-js/scaffold-pkg-pr-action@882ef0cbb70c1fb76135b9620232606686c1cb10 # v0.0.1
6668
6769 # Create a pull request:
6870 - name : ' Create pull request'
69- if : ${{ contains(github.event.comment.body, 'scaffold') }}
7071 # Pin action to full length commit SHA
7172 uses : peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e # v6.0.2
7273 with :
0 commit comments