Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 11, 2025

Summary of Changes

Addressed all PR feedback from @pelikhan:

  1. Changed default max from 10 to 1 for create-project

    • Updated in create_project.go, safe_outputs.go, main_workflow_schema.json, and documentation
  2. Moved generateCampaignId to separate helper file

    • Created project_helpers.cjs with generateCampaignId and new normalizeProjectName functions
    • Added extensive test suite in project_helpers.test.cjs (28 tests covering edge cases)
  3. Added project name normalization

    • Project names are now trimmed of whitespace before use
    • Validation ensures proper error messages for invalid inputs
  4. Removed PROJECT_GITHUB_TOKEN handling

    • Token is now properly configured via github-token parameter in step's with section
    • GitHub client automatically uses the configured token
    • Updated error messages to reference github-token configuration instead

Files Modified

  • pkg/workflow/create_project.go - Changed default max to 1
  • pkg/workflow/safe_outputs.go - Changed default max to 1
  • pkg/parser/schemas/main_workflow_schema.json - Updated schema defaults
  • docs/src/content/docs/reference/safe-outputs.md - Updated documentation
  • pkg/workflow/js/create_project.cjs - Use helpers, normalize names, remove PROJECT_GITHUB_TOKEN
  • pkg/workflow/js/create_project.test.cjs - Import generateCampaignId from helper

Files Added

  • pkg/workflow/js/project_helpers.cjs - Shared helper functions
  • pkg/workflow/js/project_helpers.test.cjs - Comprehensive test suite (28 tests)

Validation

  • ✅ All tests pass (project_helpers: 28/28, create_project: 8/8)
  • ✅ Code builds successfully
  • ✅ Linting passes
  • ✅ Formatting correct
Original prompt

Currently safe-output update-project also contains the logic to create a project if it does not exist. We want to split this to be consistent with the other safe-outputs granularity, so create a separate create-project and remove this logic from the current update-project.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Refactor safe-output by separating create project logic Split update-project into create-project and update-project safe outputs Dec 11, 2025
Copilot AI requested a review from mnkiefer December 11, 2025 00:45
@mnkiefer mnkiefer marked this pull request as ready for review December 11, 2025 00:48
@mnkiefer
Copy link
Contributor

@pelikhan: As discussed yesterday, this splits the create-project from update-project. Please review before merging. 🙏🏼 Thank you!

@pelikhan
Copy link
Contributor

Did you test it with dev.md ?

… to helper, normalize project name, remove PROJECT_GITHUB_TOKEN

Co-authored-by: pelikhan <[email protected]>
@mnkiefer
Copy link
Contributor

Did you test it with dev.md ?

This would mean modifying dev to test the create & update project scenarios and pushing that to main, then selecting this branch for testing? So if anyone else is currently testing their stuff with dev, they would be blocked, no?

@pelikhan
Copy link
Contributor

No

  • you can trigger dev from the feature branch
  • it is designed to be a scratch pad, no one should rely on it being stable in main

@pelikhan
Copy link
Contributor

Additionally, we should have at least one active agent uses these in some way. I think issue monster could maybe create a project when it discovers a cluster with 10+ issues

@pelikhan
Copy link
Contributor

The job failed silently. Needs to fail the job.

https://github.com/githubnext/gh-aw/actions/runs/20135501447/job/57787808209#step:4:1

@pelikhan
Copy link
Contributor

Well known environement variables should be prefixed with GH_AW_...

@githubnext githubnext deleted a comment from github-actions bot Dec 11, 2025
@githubnext githubnext deleted a comment from github-actions bot Dec 11, 2025
@mnkiefer
Copy link
Contributor

The job failed silently. Needs to fail the job.

https://github.com/githubnext/gh-aw/actions/runs/20135501447/job/57787808209#step:4:1

Yes, still working on it, will ping you when ready. 👍🏼

@githubnext githubnext deleted a comment from github-actions bot Dec 11, 2025
@githubnext githubnext deleted a comment from github-actions bot Dec 11, 2025
@githubnext githubnext deleted a comment from github-actions bot Dec 11, 2025
@pelikhan
Copy link
Contributor

De-prioritized.

@pelikhan pelikhan closed this Dec 11, 2025
@pelikhan pelikhan deleted the copilot/split-create-project-logic branch December 15, 2025 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants