Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 65 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,74 @@
# make-account-green
# Make Account Green

![](https://user-images.githubusercontent.com/3188890/187051752-e6203ce6-95e4-4e12-9a21-d056d07fdab7.png)
![Make Account Green](https://user-images.githubusercontent.com/3188890/187051752-e6203ce6-95e4-4e12-9a21-d056d07fdab7.png)

## Purpose
This is a lazy repo that will generate public activity for this account to game the contributions graph.

This repository aims to generate public activity for this GitHub account, effectively "gaming" the contributions graph. It serves as a demonstration of how contribution metrics can be manipulated.

## Why
Because any system can be gamed

Many systems can be manipulated, and this project serves as an example of how to exploit GitHub's contribution tracking. By automating public activity, we can demonstrate the impact of algorithm-driven metrics.

## How It Works

The project automates actions such as creating commits, opening issues, and submitting pull requests to generate visible contributions on the GitHub profile. This is achieved through GitHub Actions, which run workflows to execute the necessary commands.

## Installation

1. **Fork the Repository:**
- Click on the “Fork” button at the top right corner of this page to create your own copy of the repository.

2. **Clone the Repository:**
```bash
git clone https://github.com/YOUR_USERNAME/make-account-green.git
cd make-account-green
```

3. **Configure GitHub Actions:**
- Ensure that GitHub Actions is enabled for your repository. You may need to create a workflow file in the `.github/workflows` directory to set up your automation.

## Usage

- After setting up the repository and GitHub Actions, the automation will run periodically to generate activity.

### Example Workflows

Here’s a simple example of how to set up a GitHub Actions workflow to automate commits:

```yaml
name: Generate Activity

on:
schedule:
- cron: '0 * * * *' # Runs every hour

jobs:
generate-activity:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Create a dummy commit
run: |
echo "Auto-generated activity" >> activity.txt
git config --local user.name "Your Name"
git config --local user.email "you@example.com"
git add activity.txt
git commit -m "Auto-generated commit"
git push
```

## 2022 Update

This project now runs on GitHub Actions, allowing for a more efficient and seamless automation process. This transition is a response to issues raised in the community, specifically issue [#4](https://github.com/nexus-uw/make-account-green/issues/4).

## Notes

- The idea for this project was inspired by [Zeke Sikelianos’ article](http://zeke.sikelianos.com/npm-and-github-automation-with-heroku/), which discusses GitHub and npm automation.




### Notes
(idea _forked_ from http://zeke.sikelianos.com/npm-and-github-automation-with-heroku/)

## 2022 update
now runs on github actions due to https://github.com/nexus-uw/make-account-green/issues/4
46 changes: 34 additions & 12 deletions doWork.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,34 @@
#!/usr/bin/env bash
git clone https://github.com/nexus-uw/make-account-green
cd make-account-green

echo $[ 1 + $[ RANDOM % 10000000 ]] > random_number.txt
git add random_number.txt
git config user.email "nexus-uw@users.noreply.github.com"
git config user.name "nexus-uw"
git commit -m 'added new random number'
git push origin master --follow-tags
cd ..
rm -rf make-account-green
#!/usr/bin/env bash

# Function to handle errors
handle_error() {
echo "Error occurred in script at line: $1"
exit 1
}

# Enable exit on error
set -e

# Clone the repository
git clone https://github.com/nexus-uw/make-account-green || handle_error ${LINENO}
cd make-account-green || handle_error ${LINENO}

# Generate a random number and save it to a file
echo $(( 1 + RANDOM % 10000000 )) > random_number.txt || handle_error ${LINENO}

# Stage the new file
git add random_number.txt || handle_error ${LINENO}

# Set Git user configuration
git config user.email "nexus-uw@users.noreply.github.com" || handle_error ${LINENO}
git config user.name "nexus-uw" || handle_error ${LINENO}

# Commit the changes
git commit -m 'added new random number' || handle_error ${LINENO}

# Push changes to the master branch
git push origin master --follow-tags || handle_error ${LINENO}

# Cleanup: Navigate back and remove the cloned directory
cd .. || handle_error ${LINENO}
rm -rf make-account-green || handle_error ${LINENO}