feat: add GitHub PR flow for new entries#167
Open
ethanholz wants to merge 1 commit into
Open
Conversation
Assisted-by: Pi:gpt-5.5
Contributor
|
This PR has been staged at https://7ffebd58.omsf-directory.pages.dev. It has been updated for commit b12e9ca. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a GitHub-assisted submission flow to the “Add New Entry” form so users can generate YAML and jump to GitHub with a prefilled new file path/content, enabling a PR-based contribution workflow.
Changes:
- Adds an “Entry Type” selector and derives a target YAML path (
software/...vsworkflows/...). - Adds a new action to open GitHub’s “new file” page with prefilled filename/content/commit message.
- Updates helper copy and UI layout (target path display, button group), and fixes a tags description typo.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+246
to
+251
| <Bubble onclick={() => openGitHubNewFile()} disabled={!isFormValid} | ||
| >Open GitHub PR</Bubble | ||
| > | ||
| <Bubble onclick={() => copyYamlToClipboard()} disabled={!isFormValid} | ||
| >Copy YAML</Bubble | ||
| > |
Comment on lines
+134
to
+136
| <option value="software">Software</option> | ||
| <option value="workflows">Workflow</option> | ||
| </select> |
Comment on lines
+100
to
+111
| function openGitHubNewFile() { | ||
| const params = new URLSearchParams({ | ||
| filename: targetPath, | ||
| value: yamlContent, | ||
| message: `Add ${formData.name} to OMSF directory`, | ||
| }); | ||
| window.open( | ||
| `${GITHUB_NEW_FILE_URL}?${params.toString()}`, | ||
| "_blank", | ||
| "noopener,noreferrer", | ||
| ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support to the web form to "Open GitHub PR". There is some validation that I will need for a non-OMSF contributor before merging but this is a good first pass.
Assisted-by: Pi:gpt-5.5