Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 5, 2025

This PR adds a new GitHub Actions workflow that allows users to create and push new branches to the repository through the GitHub Actions interface.

Features

The new create-branch.yml workflow provides:

  • Manual trigger: Uses workflow_dispatch to allow on-demand execution
  • User input: Requires a mandatory name string parameter for the branch name
  • Proper permissions: Has contents: write permission to create and push branches
  • Error handling: Checks for existing branches and fails gracefully if a branch already exists
  • User feedback: Provides a workflow summary with branch details and a direct link to the new branch

Implementation Details

The workflow follows GitHub Actions best practices:

  • Uses actions/checkout@v5 with full git history (fetch-depth: 0)
  • Configures git with the standard GitHub Actions bot identity
  • Validates branch names don't already exist remotely before creation
  • Uses proper shell scripting practices (passes actionlint validation)
  • Provides clear error messages and success feedback

Usage

Users can trigger this workflow from the Actions tab by:

  1. Selecting "Create Branch" workflow
  2. Clicking "Run workflow"
  3. Entering the desired branch name
  4. The workflow will create and push the new branch

This addresses the need for a simple, user-friendly way to create branches without requiring local git operations or direct repository access.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build3396865111/b278/cli.test -test.testlogfile=/tmp/go-build3396865111/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)
    • Triggering command: /tmp/go-build1409158599/b278/cli.test -test.testlogfile=/tmp/go-build1409158599/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


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

- Triggers on workflow_dispatch with mandatory 'name' string input
- Has contents: write permissions
- Creates and pushes new branch with user-provided name
- Includes error handling for existing branches
- Adds workflow summary with branch details
- Passes actionlint validation

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] add a "create-branch.yml" github action workflow that: - triggers on worflow-distach and has a mandatory "name" string input parameter - has permissions: contents: write - create a new branch with the branch name given by the user and pushes to the re... Add create-branch.yml GitHub Actions workflow Sep 5, 2025
@Copilot Copilot AI requested a review from pelikhan September 5, 2025 21:16
Copilot finished work on behalf of pelikhan September 5, 2025 21:16
@pelikhan pelikhan marked this pull request as ready for review September 5, 2025 21:42
@pelikhan pelikhan merged commit 4ff7fab into main Sep 5, 2025
@pelikhan pelikhan deleted the copilot/add-create-branch-workflow branch September 5, 2025 21:42
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