This repository contains utility functions for the Autocommiter tool.
Autocommiter is a Python utility that automates the process of creating a local Git repository, setting up GitHub Actions for scheduled commits, and uploading the repository to GitHub.
- Create a local Git repository
- Set up GitHub Actions for scheduled commits
- Generate a comprehensive README
- Add a license to your project
Before using Autocommiter, make sure you have:
Python installed on your system A GitHub account with a personal access token
A Desktop application is also available for Windows users in case you don't have Python installed on your system.
- Run the
create_local_repository
function. - Follow the prompts to provide a folder name and a TXT file name.
- Schedule the automatic commits by entering a time in UTC.
The create_local_repository
function automatically creates a GitHub Actions workflow file (.github/workflows/auto_commit.yml
). This workflow is scheduled to run at the specified time every day.
name: Auto Commit
on:
schedule:
- cron: '[cron_expression]'
permissions:
contents: write
jobs:
update-text-file:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Update TXT File
run: echo $(date) >> [file_name].txt
- name: Commit Changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -am "Auto commit at $(date)"
git push
Special thanks to the Autocommiter community for their support and contributions.
This project is licensed under the MIT License - see the LICENSE file for details.