This is a bot written in Rust that scans pull request content for numbers, calculates their Fibonacci numbers, and posts a comment with the results. The action will support two parameters which a "enable_fib" (flag to enable Fibonacci calculation) and "max_threshold" (a threshold limit).
It uses a set of different functions that enable it to extract numbers from a PR made to the actual repository, calculate the fibonacci numbers of each of them and write the result as a comment under the PR.
- Install Rust
- Install Docker
steps:
- name: fibBot
uses: @Guy-Ghis/fibBot@v1
with:
enable_fib: true
max_threshold: 100
pr_number: ${{ github.event.pull_request.number }}To run the action locally, clone the repository:
git clone https://github.com/Guy-Ghis/fibBot.gitBuild the Rust project:
cargo build --releaseBuild Docker image
docker build -t fibBot .Run the following command:
docker run --rm \
-e GITHUB_TOKEN=your_token \
-e GITHUB_REPOSITORY=owner/repo \
-e PR_NUMBER=123 \
fibbot --enable-fib --max-threshold 100