Fix & Enhance API refs tool#3230
Open
adriendupuis wants to merge 30 commits into
Open
Conversation
``` + git init hint: Using 'master' as the name for the initial branch. This default branch name hint: will change to "main" in Git 3.0. To configure the initial branch name ```
|
Preview of modified files: no change to preview. |
|
# Conflicts: # tools/api_refs/api_refs.sh
Summary
|
fatal: 'origin' does not appear to be a git repository
fatal: 'origin' does not appear to be a git repository
Hey, Do you know how to execute the following security suggestion in github action @api_refs.yaml?: inputs.base_branch is vulnerable to script injection: values of inputs are provided by whoever triggers the workflow. Change this workflow to not use user-controlled data directly in a run block, for example by assigning this expression to an environment variable.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
Co-authored-by: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com>
# Conflicts: # tools/api_refs/api_refs.sh
# Conflicts: # tools/api_refs/api_refs.sh
adriendupuis
commented
Jul 24, 2026
| with: | ||
| ref: ${{ steps.version_and_branches.outputs.base_branch }} | ||
|
|
||
| - name: Check if work branch exists |
Contributor
Author
There was a problem hiding this comment.
For performance optimization, it should be moved above the checkout. But the checkout step does more than just checkout. Among other things, it seems to set Git authentication.
When I moved it before the checkout, I had fatal: 'origin' does not appear to be a git repository error.
7 tasks
mnocon
approved these changes
Jul 24, 2026
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.



create-projectstep. When an auth.json file is passed has tool argument, internally useCOMPOSER_AUTHforcreate-project.base_branch,work_branch, andforcebase_branchis starting branch, then the target of the PRwork_branchis the branch the build is committed to. If it exists, the push will be rejected by default. It can be overwritten/force-pushed if force=true; If the PR forbase_branchandwork_branchalready exists, it's updated.gh workflow run api_refs.yaml -f version=v5.0.8 --ref fix-api_refs-tool -f base_branch=enh-api_refs-tool -f work_branch=my-api-refsopen a new PR.gh workflow run api_refs.yaml -f version=v5.0.10 -f use_dev_version=true --ref fix-api_refs-tool -f base_branch=enh-api_refs-tool -f work_branch=my-api-refsfailed.gh workflow run api_refs.yaml -f version=v5.0.10 -f use_dev_version=true --ref fix-api_refs-tool -f base_branch=enh-api_refs-tool -f work_branch=my-api-refs -f force=trueupdate the branch and the PR.To control PHP version and avoid some memory issue, I use locally:
masterbranch being deprecated when initializing Git for recipes.Checklist