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
3 changes: 2 additions & 1 deletion .github/workflows/ai-moderator.lock.yml

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

3 changes: 2 additions & 1 deletion .github/workflows/campaign-generator.lock.yml

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

3 changes: 2 additions & 1 deletion .github/workflows/workflow-generator.lock.yml

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

10 changes: 5 additions & 5 deletions actions/setup/js/add_comment.cjs

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

2 changes: 1 addition & 1 deletion actions/setup/js/lock-issue.cjs

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

2 changes: 1 addition & 1 deletion actions/setup/js/noop.cjs

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

3 changes: 2 additions & 1 deletion pkg/workflow/compiler_activation_jobs.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,8 @@ func (c *Compiler) buildActivationJob(data *WorkflowData, preActivationJobCreate
steps = append(steps, " global.context = context;\n")
steps = append(steps, " global.exec = exec;\n")
steps = append(steps, " global.io = io;\n")
steps = append(steps, " require('"+SetupActionDestination+"/lock-issue.cjs');\n")
steps = append(steps, " const { main } = require('"+SetupActionDestination+"/lock-issue.cjs');\n")
steps = append(steps, " await main();\n")
} else {
// Add the lock-issue script
formattedScript := FormatJavaScriptForYAML(lockIssueScript)
Expand Down
2 changes: 1 addition & 1 deletion pkg/workflow/js/lock-issue.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ async function main() {
}
}

await main();
module.exports = { main };
8 changes: 4 additions & 4 deletions pkg/workflow/lock_for_agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ Test workflow with lock-for-agent enabled.
"Lock issue for agent workflow",
"Unlock issue after agent workflow",
"GH_AW_LOCK_FOR_AGENT: \"true\"",
"lockForAgent && (eventName === \"issues\" || eventName === \"issue_comment\")",
"This issue has been locked while the workflow is running",
"lock-issue.cjs", // Check for require() call to lock-issue script
"unlock-issue.cjs", // Check for require() call to unlock-issue script
}

for _, expected := range expectedStrings {
Expand Down Expand Up @@ -378,8 +378,8 @@ Test workflow with lock-for-agent enabled for issue_comment events.
"Lock issue for agent workflow",
"Unlock issue after agent workflow",
"GH_AW_LOCK_FOR_AGENT: \"true\"",
"lockForAgent && (eventName === \"issues\" || eventName === \"issue_comment\")",
"This issue has been locked while the workflow is running",
"lock-issue.cjs", // Check for require() call to lock-issue script
"unlock-issue.cjs", // Check for require() call to unlock-issue script
}

for _, expected := range expectedStrings {
Expand Down