Conversation
There was a problem hiding this comment.
Pull request overview
This PR enhances the struct-generate.yaml workflow by making inputs more flexible, improving security through token management, and ensuring clean workspace state before PR generation. The changes focus on making the workflow more robust and compatible with URI-based file references.
- Made
struct_fileandoutput_dirinputs optional with improved defaults - Added
GITHUB_TOKENenvironment variable for secure GitHub API access - Implemented cleanup of
custom-structuresdirectory before PR generation
|
|
||
| - name: Run STRUCT | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.token }} |
There was a problem hiding this comment.
The workflow references secrets.token instead of the standard secrets.GITHUB_TOKEN. If secrets.token is not explicitly configured in the repository settings, this will be empty and the STRUCT command may fail when attempting to access GitHub APIs. Consider using secrets.GITHUB_TOKEN which is automatically provided by GitHub Actions, or document that secrets.token must be configured.
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.
This pull request updates the
.github/workflows/struct-generate.yamlworkflow to improve flexibility and security in how STRUCT files are handled, and to ensure the workspace is clean before generating pull requests. The most important changes are grouped below.Workflow input improvements:
struct_fileandoutput_dirinputs optional, and updated the default value forstruct_fileto use a URI scheme (file://.struct.yaml) for better compatibility.Environment and security enhancements:
GITHUB_TOKENenvironment variable to the STRUCT job, allowing secure access to GitHub APIs during execution.Workspace cleanup before PR generation:
custom-structuresdirectory before generating a pull request, ensuring that no residual files affect the PR creation process.