Git Product home page Git Product logo

create_sprint_branch's Introduction

Sprint Branch Automation

This project automates the creation of sprint branches based on a fixed 14-day sprint cycle using a Python script and GitHub Actions.

Table of Contents

Overview

The purpose of this project is to automate the process of determining the start of a new sprint and creating a corresponding Git branch. The Python script calculates if today is the start of a new sprint based on a 14-day cycle and constructs a branch name. The GitHub Actions workflow runs the script daily and creates the branch if applicable.

Features

  • Automated Sprint Calculation: Determine the start of new sprints based on a fixed cycle.
  • Dynamic Branch Creation: Automatically create and push sprint branches.
  • Daily Automation: Runs daily at midnight UTC.
  • Manual Trigger: Can be triggered manually via GitHub Actions.

Installation

  1. Clone the Repository:
   git clone https://github.com/vib795/create_sprint_branch.git
   cd create_sprint_branch
  1. Setup Python Environment: Ensure you have Python 3.x installed. You can set up a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

Usage

  1. Run the Script Manually: You can run the script manually to see if today is a sprint start day:
python scripts/calculate_sprint_details.py
  1. Configure GitHub Actions: Ensure the workflow file is located in the correct directory.

Configure GitHub Actions: Ensure the create_sprint_branch.yml file is located in the .github/workflows/ directory of your repository.

Workflow

The GitHub Actions workflow is configured to run the Python script daily at midnight UTC. If today is determined to be a sprint start day, it creates a new branch named according to the calculated sprint details and pushes it to the remote repository.

Generating a Personal Access Token (PAT)

  1. Go to GitHub Settings:

    • Navigate to your GitHub account settings by clicking on your profile picture in the top right corner and selecting Settings.
  2. Generate a New Token:

    • In the left sidebar, click on Developer settings.
    • Click on Personal access tokens.
    • Click the Generate new token button.
  3. Select Scopes:

    • Give your token a descriptive name.
    • Select the scopes, such as repo (Full control of private repositories).
    • Click Generate token.
  4. Save the Token:

    • Copy the token and save it in a secure location. You will need it to create a secret in your GitHub repository.

Creating Secrets in GitHub

  1. Go to Your Repository:

    • Navigate to your GitHub repository.
    • Click on Settings.
  2. Add a New Secret:

    • In the left sidebar, click on Secrets and variables, then Actions.
    • Click the New repository secret button.
    • Name the secret GH_PAT and paste your personal access token in the value field.
    • Click Add secret.

Contributing

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes or improvements.

License

This project is licensed under the MIT License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.