Coder Social home page Coder Social logo

git_reporter's Introduction

GitLab Reporter

This tool fetches commits from a GitLab repository for a specified branch and duration, generates summary of the fetched commits using OpenAI's API, and posts the summary into a Discord channel or writes it into a file.

Installation

  • Clone the repository: git clone iosefa/gitreporter
  • Install necessary libraries/packages as mentioned in requirements.txt using pip : pip install -r requirements.txt

Required Configuration

Create a config.py file in the project's main directory and define the following:

  • GITLAB_API_TOKEN: GitLab API token.
  • GITLAB_USER: GitLab username.
  • GITLAB_BRANCH: GitLab repository branch to fetch commits from.
  • GITLAB_REPO_IDS: An array of GitLab repository IDs to monitor.
  • REPOS: A dictionary mapping repository IDs to repository names.
  • DAYS_BACK: Number of days back from the current date to fetch commits.
  • USE_DIFF: Set this to True to generate summary on the basis of commit diffs.
  • USE_MESSAGES: Set this to True to generate summary on the basis of commit messages.
  • WRITE_SUMMARIES: Set this to True to save the summary to a .txt file.

Note: USE_DIFF and USE_MESSAGES both can't be True at same time.

Usage

Once all the above are defined, run your main.py script with the command: python main.py

The program will fetch commits from the specified GitLab repositories and generate a summary depending on your configurations. The summary will then be posted to the configured Discord channel or saved to a .txt file as a summary.

Contributing

We welcome contributions to the GitLab Reporter project! If you have suggestions for improvements or new features, feel free to submit a pull request or open an issue. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Contact

If you have any questions or feedback, please contact me at [email protected].

git_reporter's People

Contributors

iosefa avatar

Watchers

 avatar

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.