Skip to content

fix: supercommit_max.sh unconditional push + add test suite#156

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/supercommit-script
Draft

fix: supercommit_max.sh unconditional push + add test suite#156
Copilot wants to merge 5 commits into
mainfrom
copilot/supercommit-script

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

supercommit_max.sh claimed to skip push when no upstream is configured ("evita errores en CI"), but only honored that in the no-new-commit branch — after a successful commit it always ran git push unconditionally, failing with exit 128 in upstream-less environments.

Changes

supercommit_max.sh

  • Bug fix: post-commit push now guards on upstream presence, consistent with the no-commit branch and the script's own documented intent:
    if [ "$did_commit" -eq 1 ]; then
      if git rev-parse --verify "@{u}" >/dev/null 2>&1; then
        git push
      else
        echo "Commit creado. Sin push: no hay upstream (@{u})…"
      fi

tests/test_supercommit_max.py (new, 12 tests)

Class Covers
TestScriptExists File present and executable
TestRequiredStamps Rejects each of the 5 missing-stamp cases; rejects empty message
TestValidMessage Accepts valid message with no remote, clean exit on no changes, commit log reflects provided message
TestDefaultMessage Embedded default message contains all required stamps

Tests use an isolated temp git repo (script pre-committed) so they never touch the real repo or network.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
tryonyou-app Ready Ready Preview, Comment Apr 9, 2026 4:22am
tryonyou-pilot Error Error Apr 9, 2026 4:22am

Request Review

Copilot AI and others added 4 commits April 9, 2026 04:14
…zaAbsoluta @lo+erestu PCT/EP2025/067317 Bajo Protocolo de Soberanía V10 - Founder: Rubén

Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
…zaAbsoluta @lo+erestu PCT/EP2025/067317 Bajo Protocolo de Soberanía V10 - Founder: Rubén

Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
…zaAbsoluta @lo+erestu PCT/EP2025/067317 Bajo Protocolo de Soberanía V10 - Founder: Rubén

Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
…zaAbsoluta @lo+erestu PCT/EP2025/067317 Bajo Protocolo de Soberanía V10 - Founder: Rubén

Co-authored-by: LVT-ENG <214667862+LVT-ENG@users.noreply.github.com>
Copilot AI changed the title [WIP] Add supercommit_max.sh script fix: supercommit_max.sh unconditional push + add test suite Apr 9, 2026
Copilot AI requested a review from LVT-ENG April 9, 2026 04:22
@cursor cursor Bot deleted the copilot/supercommit-script branch April 9, 2026 08:21
@LVT-ENG LVT-ENG force-pushed the main branch 2 times, most recently from 6ddd408 to 008228f Compare April 19, 2026 04:55
Copy link
Copy Markdown
Member

@LVT-ENG LVT-ENG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Copy Markdown
Member

@LVT-ENG LVT-ENG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

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.

2 participants