-
-
Notifications
You must be signed in to change notification settings - Fork 1
Claude/audit dependabot setup xfl71 #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,151 @@ | ||||||||||||||||||||||||||||||||||||||||
| name: Auto Dependencies to Securite Branch | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||
| pull_request: | ||||||||||||||||||||||||||||||||||||||||
| types: [opened, synchronize] | ||||||||||||||||||||||||||||||||||||||||
| paths: | ||||||||||||||||||||||||||||||||||||||||
| - 'package.json' | ||||||||||||||||||||||||||||||||||||||||
| - 'package-lock.json' | ||||||||||||||||||||||||||||||||||||||||
| - '.github/workflows/**' | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||
| contents: write | ||||||||||||||||||||||||||||||||||||||||
| pull-requests: write | ||||||||||||||||||||||||||||||||||||||||
| issues: write | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||
| auto-merge-to-securite: | ||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||
| if: ${{ startsWith(github.head_ref, 'dependabot/') || contains(github.head_ref, 'dependencies') }} | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| - name: Ensure securite branch exists | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| git fetch origin securite 2>/dev/null || git switch --create securite | ||||||||||||||||||||||||||||||||||||||||
| git push origin securite || true | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+29
to
+31
|
||||||||||||||||||||||||||||||||||||||||
| git fetch origin securite 2>/dev/null || git switch --create securite | |
| git push origin securite || true | |
| # Fetch main and securite refs from origin | |
| git fetch origin main securite || true | |
| # Check if the securite branch exists on the remote | |
| if git ls-remote --exit-code --heads origin securite >/dev/null 2>&1; then | |
| # Ensure we have a local securite branch tracking origin/securite | |
| if git show-ref --verify --quiet refs/heads/securite; then | |
| git switch securite | |
| else | |
| git switch --track -c securite origin/securite | |
| fi | |
| else | |
| # Create securite from main explicitly if it does not exist yet | |
| git switch main || git switch origin/main | |
| git switch --create securite | |
| git push -u origin securite | |
| fi |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the GIT_AUTHOR_EMAIL secret is not set or is empty, the git config command will set an empty email, which will cause git operations to fail. Consider adding validation to ensure the secret exists and has a valid value, or provide a fallback default email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge the fetched PR branch instead of origin/*
The fetch step creates/updates a local branch with git fetch origin ${{ github.head_ref }}:${{ github.head_ref }}, but the merge uses origin/${{ github.head_ref }}. On pull_request runs, actions/checkout does not fetch that remote-tracking ref, so origin/<head_ref> is typically missing or stale. Because the merge error is silenced with || true, the job proceeds to push securite without the PR changes. This means Dependabot updates won’t actually land in securite in the common case. Merge the local branch (${{ github.head_ref }}) or fetch into refs/remotes/origin/<head_ref> before merging.
Useful? React with 👍 / 👎.
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command uses || true which suppresses all errors, including legitimate ones like authentication failures or network issues. This makes debugging difficult and could hide real problems. Consider removing the || true or at least logging the error before suppressing it.
| git merge origin/${{ github.head_ref }} --no-edit || true | |
| git merge origin/${{ github.head_ref }} --no-edit |
EthanThePhoenix38 marked this conversation as resolved.
Show resolved
Hide resolved
EthanThePhoenix38 marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check for PR count compares a string '0' instead of an integer. While this may work in shell, it's more reliable to compare as an integer. Consider changing the condition to use integer comparison or ensure the comparison is correct for your shell environment.
| if: steps.check-pr.outputs.pr_count == '0' | |
| if: ${{ fromJSON(steps.check-pr.outputs.pr_count) == 0 }} |
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the GIT_AUTHOR_EMAIL secret is not set or is empty, the git config command will set an empty email, which will cause git operations to fail. Consider adding validation to ensure the secret exists and has a valid value, or provide a fallback default email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
EthanThePhoenix38 marked this conversation as resolved.
Show resolved
Hide resolved
EthanThePhoenix38 marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Jan 8, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reference to steps.check-conflicts.outputs.conflict_details will not work correctly because the output was set using command substitution with potentially multi-line content. This will cause the issue body to be malformed or incomplete. Store the conflict details in a file instead and read from it when creating the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot open a new pull request to apply changes based on this feedback
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -40,11 +40,13 @@ jobs: | |||||||||||||
| rm -rf README.md && mv NEW-README.md README.md | ||||||||||||||
|
|
||||||||||||||
| - name: Commit and push changes | ||||||||||||||
| env: | ||||||||||||||
| GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }} | ||||||||||||||
| run: | | ||||||||||||||
|
||||||||||||||
| run: | | |
| run: | | |
| if [ -z "${GIT_AUTHOR_EMAIL}" ]; then | |
| echo "GIT_AUTHOR_EMAIL is not set or empty; using default GitHub Actions bot email." | |
| GIT_AUTHOR_EMAIL="github-actions[bot]@users.noreply.github.com" | |
| fi |
Uh oh!
There was an error while loading. Please reload this page.