{"id":31975276,"url":"https://github.com/babblebey/fix-contributor-table","last_synced_at":"2025-10-30T20:09:00.098Z","repository":{"id":315973046,"uuid":"1061438244","full_name":"babblebey/fix-contributor-table","owner":"babblebey","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-21T22:55:11.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-14T20:38:21.884Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babblebey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-21T22:40:46.000Z","updated_at":"2025-09-21T22:55:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"ad025bef-8784-4358-824a-6008c146edb5","html_url":"https://github.com/babblebey/fix-contributor-table","commit_stats":null,"previous_names":["babblebey/fix-contributor-table"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/babblebey/fix-contributor-table","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babblebey%2Ffix-contributor-table","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babblebey%2Ffix-contributor-table/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babblebey%2Ffix-contributor-table/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babblebey%2Ffix-contributor-table/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babblebey","download_url":"https://codeload.github.com/babblebey/fix-contributor-table/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babblebey%2Ffix-contributor-table/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281873494,"owners_count":26576262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-30T02:00:06.501Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-14T20:38:18.414Z","updated_at":"2025-10-30T20:09:00.093Z","avatar_url":"https://github.com/babblebey.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fix-contributor-table\n\nA JavaScript tool to fix and maintain contributor tables by syncing GitHub repository contributors with Supabase database.\n\n## Features\n\n- Fetches contributor data from GitHub API\n- Stores contributor information in Supabase database\n- Supports manual GitHub Actions workflow dispatch\n- Environment variable validation\n- Error handling and logging\n\n## Prerequisites\n\n- Node.js 18+ \n- npm or yarn\n- Supabase project with a `contributors` table\n- GitHub personal access token\n\n## Installation\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd fix-contributor-table\n```\n\n2. Install dependencies:\n```bash\nnpm install\n```\n\n## Environment Variables\n\nThe following environment variables are required:\n\n- `SUPABASE_URL`: Your Supabase project URL\n- `SUPABASE_SERVICE_ROLE_KEY`: Your Supabase service role key (with database access)\n- `GITHUB_TOKEN`: GitHub personal access token with repo access\n\nOptional environment variables:\n- `REPO_OWNER`: GitHub repository owner (defaults to current repository owner)\n- `REPO_NAME`: GitHub repository name (defaults to current repository name)\n\n## Usage\n\n### Local Development\n\n1. Set up your environment variables:\n```bash\nexport SUPABASE_URL=\"your-supabase-url\"\nexport SUPABASE_SERVICE_ROLE_KEY=\"your-service-role-key\"\nexport GITHUB_TOKEN=\"your-github-token\"\n```\n\n2. Run the script:\n```bash\nnpm run fix-contributor\n# or\nnpm start\n```\n\n### GitHub Actions\n\nThe repository includes a GitHub Actions workflow that can be manually triggered:\n\n1. Go to the \"Actions\" tab in your GitHub repository\n2. Select \"Fix Contributor Table\" workflow\n3. Click \"Run workflow\"\n4. Optionally specify:\n   - Repository owner (defaults to current repo owner)\n   - Repository name (defaults to current repo name)\n   - Dry run mode (test without making changes)\n\n### Required Secrets\n\nConfigure the following secrets in your GitHub repository settings:\n\n- `SUPABASE_URL`\n- `SUPABASE_SERVICE_ROLE_KEY`\n- `GITHUB_TOKEN` (automatically available in GitHub Actions)\n\n## Database Schema\n\nThe script expects a `contributors` table in Supabase with the following structure:\n\n```sql\nCREATE TABLE contributors (\n  id SERIAL PRIMARY KEY,\n  username TEXT NOT NULL,\n  github_id BIGINT NOT NULL,\n  avatar_url TEXT,\n  html_url TEXT,\n  contributions INTEGER DEFAULT 0,\n  repository TEXT NOT NULL,\n  type TEXT DEFAULT 'User',\n  updated_at TIMESTAMPTZ DEFAULT NOW(),\n  UNIQUE(github_id, repository)\n);\n```\n\n## Project Structure\n\n```\nfix-contributor-table/\n├── .github/\n│   └── workflows/\n│       └── fix-contributor.yml    # GitHub Actions workflow\n├── fix-contributor.js             # Main script\n├── package.json                   # Project configuration\n├── .gitignore                     # Git ignore rules\n└── README.md                      # This file\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Test thoroughly\n5. Submit a pull request\n\n## License\n\nISC","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabblebey%2Ffix-contributor-table","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabblebey%2Ffix-contributor-table","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabblebey%2Ffix-contributor-table/lists"}