From 4c849aa92c006f5ca6949d53ef414e3f7d0f899c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:32:20 +0000 Subject: [PATCH 1/4] Initial plan From 1e2e5566cfdfcff35061011b14f62de1acdb2da9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 21:51:31 +0000 Subject: [PATCH 2/4] feat: update action-tag to use action pins mode (gh-aw-actions) with v0 tag - validateActionTag now accepts version tags (v0, v1, v1.0.0) in addition to full SHAs - resolveActionReference uses action mode (github/gh-aw-actions) when frontmatter action-tag is set - daily-fact.md updated to use action-tag: "v0" - Recompiled daily-fact.lock.yml: now uses github/gh-aw-actions/setup@v0 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/daily-fact.lock.yml | 10 +++---- .github/workflows/daily-fact.md | 2 +- pkg/workflow/action_reference.go | 31 ++++++++++----------- pkg/workflow/action_reference_test.go | 14 +++++----- pkg/workflow/features_validation.go | 35 ++++++++++++++++-------- pkg/workflow/features_validation_test.go | 29 +++++++++++--------- 6 files changed, 67 insertions(+), 54 deletions(-) diff --git a/.github/workflows/daily-fact.lock.yml b/.github/workflows/daily-fact.lock.yml index e5c57c7fcd6..2c1e77fddbf 100644 --- a/.github/workflows/daily-fact.lock.yml +++ b/.github/workflows/daily-fact.lock.yml @@ -23,7 +23,7 @@ # # Posts a daily poetic verse about the gh-aw project to a discussion thread # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"3fe8069e73efba5ca03ea4db342e0206f7f91ab0173b8e9897869d15d9c78230","strict":true} +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"4f52087b0277166d3760ed10bbcf3f24104895b76f485550a6887cb54bd3bf58","strict":true} name: "Daily Fact About gh-aw" "on": @@ -50,7 +50,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@a70c5eada06553e3510ac27f2c3bda9d3705bccb # a70c5eada06553e3510ac27f2c3bda9d3705bccb + uses: github/gh-aw-actions/setup@v0 with: destination: /opt/gh-aw/actions - name: Generate agentic run info @@ -247,7 +247,7 @@ jobs: output_types: ${{ steps.collect_output.outputs.output_types }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@a70c5eada06553e3510ac27f2c3bda9d3705bccb # a70c5eada06553e3510ac27f2c3bda9d3705bccb + uses: github/gh-aw-actions/setup@v0 with: destination: /opt/gh-aw/actions - name: Checkout repository @@ -920,7 +920,7 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@a70c5eada06553e3510ac27f2c3bda9d3705bccb # a70c5eada06553e3510ac27f2c3bda9d3705bccb + uses: github/gh-aw-actions/setup@v0 with: destination: /opt/gh-aw/actions - name: Download agent output artifact @@ -1036,7 +1036,7 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@a70c5eada06553e3510ac27f2c3bda9d3705bccb # a70c5eada06553e3510ac27f2c3bda9d3705bccb + uses: github/gh-aw-actions/setup@v0 with: destination: /opt/gh-aw/actions - name: Download agent output artifact diff --git a/.github/workflows/daily-fact.md b/.github/workflows/daily-fact.md index f46cd494bf1..bc6529780e1 100644 --- a/.github/workflows/daily-fact.md +++ b/.github/workflows/daily-fact.md @@ -17,7 +17,7 @@ engine: strict: true timeout-minutes: 15 features: - action-tag: "a70c5eada06553e3510ac27f2c3bda9d3705bccb" + action-tag: "v0" network: allowed: diff --git a/pkg/workflow/action_reference.go b/pkg/workflow/action_reference.go index a1228321f53..74a13bd55bb 100644 --- a/pkg/workflow/action_reference.go +++ b/pkg/workflow/action_reference.go @@ -125,18 +125,21 @@ func ResolveSetupActionReference(actionMode ActionMode, version string, actionTa // resolveActionReference converts a local action path to the appropriate reference // based on the current action mode (dev vs release vs action). -// If action-tag is specified in features, it overrides the mode check and enables release mode behavior. +// If action-tag is specified in features, it overrides the mode check and enables action mode behavior +// (using the github/gh-aw-actions external repository). // For dev mode: returns the local path as-is (e.g., "./actions/create-issue") // For release mode: converts to SHA-pinned remote reference (e.g., "github/gh-aw/actions/create-issue@SHA # tag") // For action mode: converts to SHA-pinned reference in external repo if possible (e.g., "github/gh-aw-actions/create-issue@SHA # version") func (c *Compiler) resolveActionReference(localActionPath string, data *WorkflowData) string { - // Check if action-tag is specified in features - if so, override mode and use release behavior + // Check if action-tag is specified in features - if so, override mode and use action mode behavior hasActionTag := false + var frontmatterActionTag string if data != nil && data.Features != nil { if actionTagVal, exists := data.Features["action-tag"]; exists { if actionTagStr, ok := actionTagVal.(string); ok && actionTagStr != "" { hasActionTag = true - actionRefLog.Printf("action-tag feature detected: %s - using release mode behavior", actionTagStr) + frontmatterActionTag = actionTagStr + actionRefLog.Printf("action-tag feature detected: %s - using action mode behavior", actionTagStr) } } } @@ -154,15 +157,17 @@ func (c *Compiler) resolveActionReference(localActionPath string, data *Workflow if !hasActionTag { return ResolveSetupActionReference(c.actionMode, c.version, "", resolver) } + // hasActionTag is true and no compiler actionTag: use action mode with the frontmatter tag + return ResolveSetupActionReference(ActionModeAction, c.version, frontmatterActionTag, resolver) } - // Action mode - use external gh-aw-actions repository with version tag (no SHA pinning) - if c.actionMode == ActionModeAction && !hasActionTag { + // Action mode - use external gh-aw-actions repository + if c.actionMode == ActionModeAction || hasActionTag { return c.convertToExternalActionsRef(localActionPath, data) } - // Use release mode if either actionMode is release OR action-tag is specified - if c.actionMode == ActionModeRelease || hasActionTag { + // Use release mode + if c.actionMode == ActionModeRelease { // Convert to tag-based remote reference for release remoteRef := c.convertToRemoteActionRef(localActionPath, data) if remoteRef == "" { @@ -185,22 +190,14 @@ func (c *Compiler) resolveActionReference(localActionPath string, data *Workflow } if pinnedRef != "" { // Successfully resolved to SHA - if hasActionTag { - actionRefLog.Printf("action-tag override: resolved %s to SHA-pinned reference: %s", remoteRef, pinnedRef) - } else { - actionRefLog.Printf("Release mode: resolved %s to SHA-pinned reference: %s", remoteRef, pinnedRef) - } + actionRefLog.Printf("Release mode: resolved %s to SHA-pinned reference: %s", remoteRef, pinnedRef) return pinnedRef } } // If we couldn't resolve to SHA, return the tag-based reference // This happens in non-strict mode when no pin is available - if hasActionTag { - actionRefLog.Printf("action-tag override: using tag-based remote action reference: %s", remoteRef) - } else { - actionRefLog.Printf("Release mode: using tag-based remote action reference: %s", remoteRef) - } + actionRefLog.Printf("Release mode: using tag-based remote action reference: %s", remoteRef) return remoteRef } diff --git a/pkg/workflow/action_reference_test.go b/pkg/workflow/action_reference_test.go index 82d9e87426e..5fb2ce34ab3 100644 --- a/pkg/workflow/action_reference_test.go +++ b/pkg/workflow/action_reference_test.go @@ -152,8 +152,8 @@ func TestResolveActionReference(t *testing.T) { localPath: "./actions/setup", version: "v1.0.0", actionTag: "latest", - expectedRef: "github/gh-aw/actions/setup@latest", - description: "Release mode with action-tag should use action-tag instead of version", + expectedRef: "github/gh-aw-actions/setup@latest", + description: "Frontmatter action-tag should use action mode (gh-aw-actions) regardless of compiler mode", }, { name: "release mode with action-tag using SHA", @@ -161,17 +161,17 @@ func TestResolveActionReference(t *testing.T) { localPath: "./actions/setup", version: "v1.0.0", actionTag: "abc123def456789", - expectedRef: "github/gh-aw/actions/setup@abc123def456789", - description: "Release mode with action-tag SHA should use the SHA", + expectedRef: "github/gh-aw-actions/setup@abc123def456789", + description: "Frontmatter action-tag SHA should use action mode (gh-aw-actions)", }, { - name: "dev mode with action-tag uses remote reference", + name: "dev mode with action-tag uses external actions repo", actionMode: ActionModeDev, localPath: "./actions/setup", version: "v1.0.0", actionTag: "latest", - expectedRef: "github/gh-aw/actions/setup@latest", - description: "Dev mode with action-tag should override and use remote reference", + expectedRef: "github/gh-aw-actions/setup@latest", + description: "Dev mode with frontmatter action-tag should use action mode (gh-aw-actions)", }, } diff --git a/pkg/workflow/features_validation.go b/pkg/workflow/features_validation.go index f82bfb06e3f..624ad6516e6 100644 --- a/pkg/workflow/features_validation.go +++ b/pkg/workflow/features_validation.go @@ -31,6 +31,9 @@ var featuresValidationLog = newValidationLogger("features") var shaRegex = regexp.MustCompile("^[0-9a-f]{40}$") +// versionTagRegex matches version tags like "v0", "v1", "v1.0", "v1.0.0", etc. +var versionTagRegex = regexp.MustCompile(`^v[0-9]+(\.[0-9]+)*$`) + // validateFeatures validates all feature flags in the workflow data func validateFeatures(data *WorkflowData) error { if data == nil || data.Features == nil { @@ -54,7 +57,7 @@ func validateFeatures(data *WorkflowData) error { return nil } -// validateActionTag validates that action-tag is a full 40-character SHA when specified +// validateActionTag validates that action-tag is a full 40-character SHA or a version tag when specified func validateActionTag(value any) error { // Allow empty or nil values if value == nil { @@ -68,7 +71,7 @@ func validateActionTag(value any) error { "features.action-tag", fmt.Sprintf("%T", value), fmt.Sprintf("action-tag must be a string, got %T", value), - "Provide a string value for action-tag. Example:\nfeatures:\n action-tag: \"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\"", + "Provide a string value for action-tag. Example:\nfeatures:\n action-tag: \"v0\"", ) } @@ -77,17 +80,22 @@ func validateActionTag(value any) error { return nil } - // Validate it's a full SHA (40 hex characters) - if !isValidFullSHA(strVal) { - return NewValidationError( - "features.action-tag", - strVal, - fmt.Sprintf("action-tag must be a full 40-character commit SHA (length: %d). Short SHAs are not allowed", len(strVal)), - "Use 'git rev-parse ' to get the full SHA. Example:\n\n$ git rev-parse HEAD\na1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\n\nThen use in workflow:\nfeatures:\n action-tag: \"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\"", - ) + // Accept full 40-character commit SHA + if isValidFullSHA(strVal) { + return nil } - return nil + // Accept version tags like "v0", "v1", "v1.0.0" + if isValidVersionTag(strVal) { + return nil + } + + return NewValidationError( + "features.action-tag", + strVal, + fmt.Sprintf("action-tag must be a full 40-character commit SHA or a version tag (e.g. v0, v1.0.0). Got: %q", strVal), + "Use a version tag or a full commit SHA. Examples:\nfeatures:\n action-tag: \"v0\"\n\nOr with a full SHA:\nfeatures:\n action-tag: \"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0\"", + ) } // isValidFullSHA checks if a string is a valid 40-character hexadecimal SHA @@ -97,3 +105,8 @@ func isValidFullSHA(s string) bool { } return shaRegex.MatchString(s) } + +// isValidVersionTag checks if a string is a valid version tag (e.g., "v0", "v1", "v1.0.0") +func isValidVersionTag(s string) bool { + return versionTagRegex.MatchString(s) +} diff --git a/pkg/workflow/features_validation_test.go b/pkg/workflow/features_validation_test.go index 41f479d4c94..633ed11d486 100644 --- a/pkg/workflow/features_validation_test.go +++ b/pkg/workflow/features_validation_test.go @@ -92,23 +92,27 @@ func TestValidateActionTag(t *testing.T) { value: nil, expectError: false, }, + { + name: "valid - version tag v0", + value: "v0", + expectError: false, + }, + { + name: "valid - version tag v1.0.0", + value: "v1.0.0", + expectError: false, + }, { name: "invalid - short SHA (7 chars)", value: "5c3428a", expectError: true, - errorMsg: "action-tag must be a full 40-character commit SHA", + errorMsg: "action-tag must be a full 40-character commit SHA or a version tag", }, { name: "invalid - short SHA (8 chars)", value: "abc123de", expectError: true, - errorMsg: "action-tag must be a full 40-character commit SHA", - }, - { - name: "invalid - version tag instead of SHA", - value: "v1.0.0", - expectError: true, - errorMsg: "action-tag must be a full 40-character commit SHA", + errorMsg: "action-tag must be a full 40-character commit SHA or a version tag", }, { name: "invalid - not a string", @@ -126,7 +130,7 @@ func TestValidateActionTag(t *testing.T) { name: "invalid - uppercase SHA", value: "ABCDEF0123456789ABCDEF0123456789ABCDEF01", expectError: true, - errorMsg: "action-tag must be a full 40-character commit SHA", + errorMsg: "action-tag must be a full 40-character commit SHA or a version tag", }, } @@ -182,17 +186,16 @@ func TestValidateFeatures(t *testing.T) { }, }, expectError: true, - errorMsg: "action-tag must be a full 40-character commit SHA", + errorMsg: "action-tag must be a full 40-character commit SHA or a version tag", }, { - name: "invalid action-tag - version tag", + name: "valid action-tag - version tag", data: &WorkflowData{ Features: map[string]any{ "action-tag": "v2.0.0", }, }, - expectError: true, - errorMsg: "action-tag must be a full 40-character commit SHA", + expectError: false, }, { name: "empty action-tag is allowed", From af06d0d78d4944132867ba1dcd9eec32017daf44 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 22:01:03 +0000 Subject: [PATCH 3/4] refactor: move version tag parsing to semver.go, restrict to vmajor/vmajor.minor/vmajor.minor.patch Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/aw/actions-lock.json | 5 +++++ .github/workflows/daily-fact.lock.yml | 8 +++---- pkg/workflow/data/action_pins.json | 5 +++++ pkg/workflow/features_validation.go | 13 +++-------- pkg/workflow/semver.go | 10 +++++++++ pkg/workflow/semver_test.go | 32 +++++++++++++++++++++++++++ 6 files changed, 59 insertions(+), 14 deletions(-) diff --git a/.github/aw/actions-lock.json b/.github/aw/actions-lock.json index 043c6ba0977..bebe5b19fb2 100644 --- a/.github/aw/actions-lock.json +++ b/.github/aw/actions-lock.json @@ -140,6 +140,11 @@ "version": "v4.32.6", "sha": "fb0994ef1c058010acf1efccff928b0a83b1ed54" }, + "github/gh-aw-actions/setup@v0": { + "repo": "github/gh-aw-actions/setup", + "version": "v0", + "sha": "c303e453d96fe6789ee8cb3d63033c710eac347a" + }, "github/stale-repos@v9.0.2": { "repo": "github/stale-repos", "version": "v9.0.2", diff --git a/.github/workflows/daily-fact.lock.yml b/.github/workflows/daily-fact.lock.yml index 2c1e77fddbf..8417323e5e7 100644 --- a/.github/workflows/daily-fact.lock.yml +++ b/.github/workflows/daily-fact.lock.yml @@ -50,7 +50,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: github/gh-aw-actions/setup@v0 + uses: github/gh-aw-actions/setup@c303e453d96fe6789ee8cb3d63033c710eac347a # v0 with: destination: /opt/gh-aw/actions - name: Generate agentic run info @@ -247,7 +247,7 @@ jobs: output_types: ${{ steps.collect_output.outputs.output_types }} steps: - name: Setup Scripts - uses: github/gh-aw-actions/setup@v0 + uses: github/gh-aw-actions/setup@c303e453d96fe6789ee8cb3d63033c710eac347a # v0 with: destination: /opt/gh-aw/actions - name: Checkout repository @@ -920,7 +920,7 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: github/gh-aw-actions/setup@v0 + uses: github/gh-aw-actions/setup@c303e453d96fe6789ee8cb3d63033c710eac347a # v0 with: destination: /opt/gh-aw/actions - name: Download agent output artifact @@ -1036,7 +1036,7 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: github/gh-aw-actions/setup@v0 + uses: github/gh-aw-actions/setup@c303e453d96fe6789ee8cb3d63033c710eac347a # v0 with: destination: /opt/gh-aw/actions - name: Download agent output artifact diff --git a/pkg/workflow/data/action_pins.json b/pkg/workflow/data/action_pins.json index 043c6ba0977..bebe5b19fb2 100644 --- a/pkg/workflow/data/action_pins.json +++ b/pkg/workflow/data/action_pins.json @@ -140,6 +140,11 @@ "version": "v4.32.6", "sha": "fb0994ef1c058010acf1efccff928b0a83b1ed54" }, + "github/gh-aw-actions/setup@v0": { + "repo": "github/gh-aw-actions/setup", + "version": "v0", + "sha": "c303e453d96fe6789ee8cb3d63033c710eac347a" + }, "github/stale-repos@v9.0.2": { "repo": "github/stale-repos", "version": "v9.0.2", diff --git a/pkg/workflow/features_validation.go b/pkg/workflow/features_validation.go index 624ad6516e6..d9fd1af00a9 100644 --- a/pkg/workflow/features_validation.go +++ b/pkg/workflow/features_validation.go @@ -4,14 +4,15 @@ // // This file validates feature flag values to ensure they meet requirements // before being used in workflow compilation. It ensures that: -// - action-tag uses full 40-character SHA when specified +// - action-tag uses a full 40-character SHA or a version tag when specified // - Other feature-specific constraints are met // // # Validation Functions // // - validateFeatures() - Validates all feature flags in WorkflowData -// - validateActionTag() - Validates action-tag is a full SHA +// - validateActionTag() - Validates action-tag is a full SHA or version tag // - isValidFullSHA() - Checks if a string is a valid 40-character SHA +// - isValidVersionTag() - Checks if a string is a valid version tag (in semver.go) // // # When to Add Validation Here // @@ -31,9 +32,6 @@ var featuresValidationLog = newValidationLogger("features") var shaRegex = regexp.MustCompile("^[0-9a-f]{40}$") -// versionTagRegex matches version tags like "v0", "v1", "v1.0", "v1.0.0", etc. -var versionTagRegex = regexp.MustCompile(`^v[0-9]+(\.[0-9]+)*$`) - // validateFeatures validates all feature flags in the workflow data func validateFeatures(data *WorkflowData) error { if data == nil || data.Features == nil { @@ -105,8 +103,3 @@ func isValidFullSHA(s string) bool { } return shaRegex.MatchString(s) } - -// isValidVersionTag checks if a string is a valid version tag (e.g., "v0", "v1", "v1.0.0") -func isValidVersionTag(s string) bool { - return versionTagRegex.MatchString(s) -} diff --git a/pkg/workflow/semver.go b/pkg/workflow/semver.go index aa52bd0983b..e782a891909 100644 --- a/pkg/workflow/semver.go +++ b/pkg/workflow/semver.go @@ -1,14 +1,24 @@ package workflow import ( + "regexp" "strings" "github.com/github/gh-aw/pkg/logger" "golang.org/x/mod/semver" ) +// versionTagRegex matches version tags: vmajor, vmajor.minor, or vmajor.minor.patch +var versionTagRegex = regexp.MustCompile(`^v[0-9]+(\.[0-9]+(\.[0-9]+)?)?$`) + var semverLog = logger.New("workflow:semver") +// isValidVersionTag checks if a string is a valid action version tag. +// Supports vmajor, vmajor.minor, and vmajor.minor.patch formats only. +func isValidVersionTag(s string) bool { + return versionTagRegex.MatchString(s) +} + // compareVersions compares two semantic versions, returns 1 if v1 > v2, -1 if v1 < v2, 0 if equal // Uses golang.org/x/mod/semver for proper semantic version comparison func compareVersions(v1, v2 string) int { diff --git a/pkg/workflow/semver_test.go b/pkg/workflow/semver_test.go index 137b75d3cf1..8d84ba7cb7c 100644 --- a/pkg/workflow/semver_test.go +++ b/pkg/workflow/semver_test.go @@ -31,6 +31,38 @@ func TestCompareVersions(t *testing.T) { } } +func TestIsValidVersionTag(t *testing.T) { + tests := []struct { + tag string + valid bool + }{ + {"v0", true}, + {"v1", true}, + {"v10", true}, + {"v1.0", true}, + {"v1.2", true}, + {"v1.0.0", true}, + {"v1.2.3", true}, + {"v10.20.30", true}, + // invalid + {"v1.0.0.0", false}, + {"1.0.0", false}, + {"v", false}, + {"", false}, + {"latest", false}, + {"abc123def456789012345678901234567890abcd", false}, + } + + for _, tt := range tests { + t.Run(tt.tag, func(t *testing.T) { + result := isValidVersionTag(tt.tag) + if result != tt.valid { + t.Errorf("isValidVersionTag(%q) = %v, want %v", tt.tag, result, tt.valid) + } + }) + } +} + func TestIsSemverCompatible(t *testing.T) { tests := []struct { pinVersion string From 32725ba153f1775556e193cc3adb0273283892f4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Mar 2026 22:12:48 +0000 Subject: [PATCH 4/4] feat: add inlined-imports to daily-fact workflow Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/daily-fact.lock.yml | 73 ++++++++++++++++++++++++++- .github/workflows/daily-fact.md | 1 + 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/.github/workflows/daily-fact.lock.yml b/.github/workflows/daily-fact.lock.yml index 8417323e5e7..aa8555ba669 100644 --- a/.github/workflows/daily-fact.lock.yml +++ b/.github/workflows/daily-fact.lock.yml @@ -23,7 +23,9 @@ # # Posts a daily poetic verse about the gh-aw project to a discussion thread # -# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"4f52087b0277166d3760ed10bbcf3f24104895b76f485550a6887cb54bd3bf58","strict":true} +# inlined-imports: true +# +# gh-aw-metadata: {"schema_version":"v2","frontmatter_hash":"c3a22520daad2c84c316a1454aaf54231a96d461c85b591baa64d28a9a0e0177","strict":true} name: "Daily Fact About gh-aw" "on": @@ -151,7 +153,74 @@ jobs: GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' - {{#runtime-import .github/workflows/daily-fact.md}} + {{#runtime-import? .github/shared-instructions.md}} + + # Daily Fact About gh-aw + + Your task is to post a poetic, whimsical fact about the __GH_AW_GITHUB_REPOSITORY__ project to discussion #4750. + + ## Data Sources + + Mine recent activity from the repository to find interesting facts. Focus on: + + 1. **Recent PRs** (merged in the last 1-2 weeks) + - New features added + - Bug fixes + - Refactoring efforts + - Performance improvements + + 2. **Recent Releases** (if any) + - New version highlights + - Breaking changes + - Notable improvements + + 3. **Recent Closed Issues** (resolved in the last 1-2 weeks) + - Bugs that were fixed + - Feature requests implemented + - Community contributions + + ## Guidelines + + - **Favor recent updates** but include variety - pick something interesting, not just the most recent + - **Be specific**: Include PR numbers, issue references, or release tags when relevant + - **Keep it short**: One or two poetic sentences for the main fact, optionally with a brief context + - **Be poetic**: Use lyrical, whimsical language that celebrates the beauty of code and collaboration + - **Add variety**: Don't repeat the same type of fact every day (e.g., alternate between PRs, issues, releases, contributors, code patterns) + + ## Output Format + + Create a single comment with this structure: + + ``` + 🌅 **A Verse from the gh-aw Chronicles** + + [Your poetic fact here, referencing specific PRs, issues, or releases with links] + + --- + *Whispered to you by the Poet of Workflows ðŸŠķ* + ``` + + ## Examples + + Good facts (poetic tone): + - "In the garden of code, PR #1234 bloomed — the `playwright` tool now dances upon the stage, orchestrating browsers in graceful automation! 🎭" + - "Like five stars falling into place, issues of MCP woes were caught and mended this week — the path to custom tools grows ever clearer." + - "From the forge of v0.45.0 emerges `cache-memory`, a keeper of thoughts that transcends the fleeting runs of workflows! ðŸ’ū" + - "A tireless artisan toiled this week, mending three fractures in the YAML tapestry. Gratitude flows to @contributor! 🙌" + + Bad facts: + - "The repository was updated today." (too vague, lacks poetry) + - "There were some changes." (not specific, uninspired) + - Long paragraphs (keep it brief and lyrical) + + Now, analyze the recent activity and compose one poetic fact to share in discussion #4750. + + **Important**: If no action is needed after completing your analysis, you **MUST** call the `noop` safe-output tool with a brief explanation. Failing to call any safe-output tool is the most common cause of safe-output workflow failures. + + ```json + {"noop": {"message": "No action needed: [brief explanation of what was analyzed and why]"}} + ``` + GH_AW_PROMPT_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates diff --git a/.github/workflows/daily-fact.md b/.github/workflows/daily-fact.md index bc6529780e1..2f2e77b4fde 100644 --- a/.github/workflows/daily-fact.md +++ b/.github/workflows/daily-fact.md @@ -16,6 +16,7 @@ engine: model: gpt-5.1-codex-mini strict: true timeout-minutes: 15 +inlined-imports: true features: action-tag: "v0"