Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix temporaryDeploymentBranch conflict by replacing slash with hyphen#1892

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
Copilot wants to merge3 commits intodev
base:dev
Choose a base branch
Loading
fromcopilot/fix-1712

Conversation

Copy link
Contributor

CopilotAI commentedSep 11, 2025
edited
Loading

This PR fixes a Git reference conflict that occurs when creating temporary deployment branches. The action was failing when a branch namedgithub-pages-deploy-action already exists in the repository.

Problem

The action creates temporary branches using the pattern:

github-pages-deploy-action/{random-string}

When a branch namedgithub-pages-deploy-action already exists, Git cannot create the temporary branch because it interprets branch names with forward slashes as nested references. This causes the error:

fatal: cannot lock ref 'refs/heads/github-pages-deploy-action/sh2ajsxux': 'refs/heads/github-pages-deploy-action' exists; cannot create 'refs/heads/github-pages-deploy-action/sh2ajsxux'

Solution

Changed the temporary branch naming pattern from:

`github-pages-deploy-action/${randomString}`

To:

`github-pages-deploy-action-${randomString}`

This uses a hyphen separator instead of a forward slash, eliminating the Git reference conflict while maintaining a clear naming convention.

Changes Made

  • src/git.ts: Modified line 111 to use hyphen instead of forward slash intemporaryDeploymentBranch
  • tests/git.test.ts: Added test case to validate branch name format and prevent regression

Testing

  • All existing tests pass (60/60)
  • New test validates that temporary branch names use hyphens and don't contain forward slashes
  • Build and linting pass without issues

This minimal change resolves the conflict without affecting any other functionality or breaking existing workflows.

Fixes#1712.


✨ Let Copilot coding agentset things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
ContributorAuthor

@JamesIves 👋 This repository doesn't haveCopilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Clickhere to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

CopilotAIand others added2 commitsSeptember 11, 2025 01:10
Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com>
Co-authored-by: JamesIves <10888441+JamesIves@users.noreply.github.com>
CopilotAI changed the title[WIP] bug: 🐝 fail if there isgithub-pages-deploy-action branch due to conflicttemporaryDeploymentBranchFix temporaryDeploymentBranch conflict by replacing slash with hyphenSep 11, 2025
Copilot finished work on behalf ofJamesIvesSeptember 11, 2025 01:16
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@JamesIvesJamesIvesAwaiting requested review from JamesIvesJamesIves is a code owner

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

bug: 🐝 fail if there isgithub-pages-deploy-action branch due to conflicttemporaryDeploymentBranch

2 participants

@JamesIves

[8]ページ先頭

©2009-2025 Movatter.jp