diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6a2b42b --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.env +.token +.aider.chat.history.md +.aider.input.history +.aider.tags.cache.v4/ +.local/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..7ffa266 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,7 @@ +repos: + - repo: https://github.com/Yelp/detect-secrets + rev: v1.5.0 + hooks: + - id: detect-secrets + args: ['--baseline', '.secrets.baseline'] + additional_dependencies: ['gibberish-detector'] diff --git a/.secrets.baseline b/.secrets.baseline new file mode 100644 index 0000000..9223b7a --- /dev/null +++ b/.secrets.baseline @@ -0,0 +1,131 @@ +{ + "version": "1.5.0", + "plugins_used": [ + { + "name": "ArtifactoryDetector" + }, + { + "name": "AWSKeyDetector" + }, + { + "name": "AzureStorageKeyDetector" + }, + { + "name": "Base64HighEntropyString", + "limit": 4.5 + }, + { + "name": "BasicAuthDetector" + }, + { + "name": "CloudantDetector" + }, + { + "name": "DiscordBotTokenDetector" + }, + { + "name": "GitHubTokenDetector" + }, + { + "name": "GitLabTokenDetector" + }, + { + "name": "HexHighEntropyString", + "limit": 3.0 + }, + { + "name": "IbmCloudIamDetector" + }, + { + "name": "IbmCosHmacDetector" + }, + { + "name": "IPPublicDetector" + }, + { + "name": "JwtTokenDetector" + }, + { + "name": "KeywordDetector", + "keyword_exclude": "" + }, + { + "name": "MailchimpDetector" + }, + { + "name": "NpmDetector" + }, + { + "name": "OpenAIDetector" + }, + { + "name": "PrivateKeyDetector" + }, + { + "name": "PypiTokenDetector" + }, + { + "name": "SendGridDetector" + }, + { + "name": "SlackDetector" + }, + { + "name": "SoftlayerDetector" + }, + { + "name": "SquareOAuthDetector" + }, + { + "name": "StripeDetector" + }, + { + "name": "TelegramBotTokenDetector" + }, + { + "name": "TwilioKeyDetector" + } + ], + "filters_used": [ + { + "path": "detect_secrets.filters.allowlist.is_line_allowlisted" + }, + { + "path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies", + "min_level": 2 + }, + { + "path": "detect_secrets.filters.gibberish.should_exclude_secret", + "limit": 3.7 + }, + { + "path": "detect_secrets.filters.heuristic.is_indirect_reference" + }, + { + "path": "detect_secrets.filters.heuristic.is_likely_id_string" + }, + { + "path": "detect_secrets.filters.heuristic.is_lock_file" + }, + { + "path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string" + }, + { + "path": "detect_secrets.filters.heuristic.is_potential_uuid" + }, + { + "path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign" + }, + { + "path": "detect_secrets.filters.heuristic.is_sequential_string" + }, + { + "path": "detect_secrets.filters.heuristic.is_swagger_file" + }, + { + "path": "detect_secrets.filters.heuristic.is_templated_secret" + } + ], + "results": {}, + "generated_at": "2025-09-23T04:15:11Z" +} diff --git a/sql-queries/check-releases.sql b/sql-queries/check-releases.sql new file mode 100644 index 0000000..1860458 --- /dev/null +++ b/sql-queries/check-releases.sql @@ -0,0 +1,9 @@ +-- Query 1: Check if there has been at least one release within the last year +SELECT + CASE + WHEN COUNT(*) > 0 THEN 'yes' + ELSE 'no' + END AS has_release_within_last_year, + COUNT(*) > 0 AS has_release_within_last_year_bool +FROM raw_releases +WHERE publishedAt >= CURRENT_DATE - INTERVAL '1 year'; diff --git a/sql-queries/count-commits.sql b/sql-queries/count-commits.sql new file mode 100644 index 0000000..799b785 --- /dev/null +++ b/sql-queries/count-commits.sql @@ -0,0 +1,13 @@ +-- Query 3: Count the number of commits per month within the last 12 months +SELECT + strftime('%Y-%m', date) AS month, + COUNT(*) AS commits_count, + CASE + WHEN COUNT(*) > 2 THEN 'above 2' + ELSE 'below 2' + END AS commits_category, + COUNT(*) > 2 AS is_above_threshold +FROM raw_commits +WHERE date >= CURRENT_DATE - INTERVAL '1 year' +GROUP BY strftime('%Y-%m', date) +ORDER BY month; diff --git a/sql-queries/count-contributors.sql b/sql-queries/count-contributors.sql new file mode 100644 index 0000000..c1b57ac --- /dev/null +++ b/sql-queries/count-contributors.sql @@ -0,0 +1,10 @@ +-- Query 2: Count the number of active contributors within the last 12 months +SELECT + COUNT(DISTINCT login) AS active_contributors_count, + CASE + WHEN COUNT(DISTINCT login) > 3 THEN 'above 3' + ELSE 'below 3' + END AS contributor_category, + COUNT(DISTINCT login) > 3 AS is_above_threshold +FROM raw_contributors +WHERE last_contribution >= CURRENT_DATE - INTERVAL '1 year'; diff --git a/sql-queries/count-open-issues.sql b/sql-queries/count-open-issues.sql new file mode 100644 index 0000000..62aacf8 --- /dev/null +++ b/sql-queries/count-open-issues.sql @@ -0,0 +1,5 @@ +-- Query 4: Count the number of open issues +SELECT + COUNT(*) AS open_issues_count +FROM raw_issues +WHERE state = 'OPEN'; diff --git a/sql-queries/verify-repository.sql b/sql-queries/verify-repository.sql new file mode 100644 index 0000000..3f2c2fd --- /dev/null +++ b/sql-queries/verify-repository.sql @@ -0,0 +1,8 @@ +-- Query 5: Verify source code is in public repository with README and license +SELECT + 'PASS' AS repository_status, + COUNT(DISTINCT file) > 0 AS has_readme, + COUNT(license) > 0 AS has_license, + COUNT(DISTINCT file) > 0 AND COUNT(license) > 0 AS repository_verification_passed +FROM raw_root_md_files, raw_license +WHERE file = 'README.md';