Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion cmd/gh-aw/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func validateEngine(engine string) error {
var rootCmd = &cobra.Command{
Use: constants.CLIExtensionPrefix,
Short: "GitHub Agentic Workflows CLI from GitHub Next",
Long: ` = GitHub Agentic Workflows from GitHub Next
Long: `GitHub Agentic Workflows from GitHub Next

A natural language GitHub Action is a markdown file checked into the .github/workflows directory of a repository.
The file contains a natural language description of the workflow, which is then compiled into a GitHub Actions workflow file.
Expand Down
3 changes: 3 additions & 0 deletions docs/workflow-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ The following GitHub Actions context expressions are permitted in workflow markd
- `${{ github.event.workflow_run.conclusion }}` - The conclusion of the workflow run that triggered the current workflow
- `${{ github.event.workflow_run.html_url }}` - The URL of the workflow run that triggered the current workflow
- `${{ github.event.workflow_run.head_sha }}` - The head SHA of the workflow run that triggered the current workflow
- `${{ github.event.workflow_run.run_number }}` - The run number of the workflow run that triggered the current workflow
- `${{ github.event.workflow_run.event }}` - The event that triggered the workflow run that triggered the current workflow
- `${{ github.event.workflow_run.status }}` - The status of the workflow run that triggered the current workflow
- `${{ github.actor }}` - The username of the user who triggered the workflow
- `${{ github.job }}` - Job ID of the current workflow run
- `${{ github.owner }}` - The owner of the repository (user or organization name)
Expand Down
3 changes: 3 additions & 0 deletions pkg/cli/templates/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ Use GitHub Actions context expressions throughout the workflow content. **Note:
- **`${{ github.event.workflow_run.conclusion }}`** - Conclusion of the workflow run
- **`${{ github.event.workflow_run.html_url }}`** - URL of the workflow run
- **`${{ github.event.workflow_run.head_sha }}`** - Head SHA of the workflow run
- **`${{ github.event.workflow_run.run_number }}`** - Run number of the workflow run
- **`${{ github.event.workflow_run.event }}`** - Event that triggered the workflow run
- **`${{ github.event.workflow_run.status }}`** - Status of the workflow run
- **`${{ github.actor }}`** - Username of the person who initiated the workflow
- **`${{ github.job }}`** - Job ID of the current workflow run
- **`${{ github.owner }}`** - Owner of the repository
Expand Down
3 changes: 3 additions & 0 deletions pkg/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ var AllowedExpressions = []string{
"github.event.workflow_run.conclusion",
"github.event.workflow_run.html_url",
"github.event.workflow_run.head_sha",
"github.event.workflow_run.run_number",
"github.event.workflow_run.event",
"github.event.workflow_run.status",
"github.actor",
"github.job",
"github.owner",
Expand Down
15 changes: 15 additions & 0 deletions pkg/workflow/expression_safety_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,21 @@ func TestValidateExpressionSafety(t *testing.T) {
content: "Head SHA: ${{ github.event.workflow_run.head_sha }}",
expectError: false,
},
{
name: "allowed_github_event_workflow_run_run_number",
content: "Run number: ${{ github.event.workflow_run.run_number }}",
expectError: false,
},
{
name: "allowed_github_event_workflow_run_event",
content: "Triggering event: ${{ github.event.workflow_run.event }}",
expectError: false,
},
{
name: "allowed_github_event_workflow_run_status",
content: "Run status: ${{ github.event.workflow_run.status }}",
expectError: false,
},
{
name: "multiple_allowed_expressions",
content: "Workflow: ${{ github.workflow }}, Repository: ${{ github.repository }}, Output: ${{ needs.task.outputs.text }}",
Expand Down