{"id":25834354,"url":"https://github.com/humanwhocodes/social-changelog","last_synced_at":"2025-03-01T00:37:24.382Z","repository":{"id":277805627,"uuid":"933019885","full_name":"humanwhocodes/social-changelog","owner":"humanwhocodes","description":"A JavaScript utility to summarize a GitHub release changelog into a social media post","archived":false,"fork":false,"pushed_at":"2025-02-16T08:10:39.000Z","size":48,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T09:19:04.921Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humanwhocodes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-02-15T00:45:21.000Z","updated_at":"2025-02-16T01:24:40.000Z","dependencies_parsed_at":"2025-02-16T09:19:08.587Z","dependency_job_id":"f106ccee-14ac-4e9a-ad9f-ad73ea5dd59c","html_url":"https://github.com/humanwhocodes/social-changelog","commit_stats":null,"previous_names":["humanwhocodes/social-changelog"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanwhocodes%2Fsocial-changelog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanwhocodes%2Fsocial-changelog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanwhocodes%2Fsocial-changelog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanwhocodes%2Fsocial-changelog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humanwhocodes","download_url":"https://codeload.github.com/humanwhocodes/social-changelog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241293162,"owners_count":19939751,"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","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-03-01T00:37:23.851Z","updated_at":"2025-03-01T00:37:24.375Z","avatar_url":"https://github.com/humanwhocodes.png","language":"JavaScript","funding_links":[],"categories":["Categories","JavaScript"],"sub_categories":["Continuous Team Communication"],"readme":"# Social Changelog\n\nby [Nicholas C. Zakas](https://humanwhocodes.com)\n\nIf you find this useful, please consider supporting my work with a [donation](https://humanwhocodes.com/donate) or [nominate me](https://stars.github.com/nominate/) for a GitHub Star.\n\n## Description\n\nA tool that generates social media posts from GitHub releases using AI. Given a GitHub repository and release, it creates an engaging social post summarizing the key changes and improvements. This is useful for automatically creating announcement posts for new releases.\n\nThis tool uses [OpenAI](https://platform.openai.com) `gpt-4o-mini` and an OpenAI API token is required.\n\n## Installation\n\n```bash\nnpm install @humanwhocodes/social-changelog\n```\n\n## CLI Usage\n\nThe command line interface requires an OpenAI API key to be set in the environment:\n\n```bash\nexport OPENAI_API_KEY=your-api-key\n```\n\nThen you can generate posts using:\n\n```bash\nnpx social-changelog --org \u003corg\u003e --repo \u003crepo\u003e --name \u003cproject-name\u003e\n```\n\n### Options\n\n- `--org, -o` - The GitHub organization or username\n- `--repo, -r` - The repository name\n- `--name, -n` - (Optional) The display name of the project (defaults to org/repo)\n- `--tag, -t` - (Optional) Specific release tag to use (defaults to latest)\n- `--help, -h` - Show help information\n\n### Examples\n\nGenerate post for latest release:\n\n```bash\nnpx social-changelog --org humanwhocodes --repo social-changelog\n```\n\nBy default, the `org/repo` will be used as the project name. You can override this by providing the `--name` option:\n\n```bash\nnpx social-changelog --org humanwhocodes --repo social-changelog --name \"Social Changelog\"\n```\n\nThe latest release will be used by default. You can ovveride this by providing the `--tag` option:\n\n```bash\nnpx social-changelog --org humanwhocodes --repo social-changelog --name \"Social Changelog\" --tag v1.0.0\n```\n\n**Note:** The tag name must contain a semver-formatted version number.\n\nThe CLI outputs the post onto the console so you can capture it or pipe it into another tool.\n\n## API Usage\n\n### `PostGenerator`\n\nThe main class for generating social posts.\n\n```javascript\nimport { PostGenerator } from \"@humanwhocodes/social-changelog\";\n\n// Create generator instance\nconst generator = new PostGenerator(process.env.OPENAI_API_KEY, {\n\tprompt: \"Optional custom prompt\",\n});\n\n// Generate a post\nconst post = await generator.generateSocialPost(\"Project Name\", {\n\turl: \"https://github.com/org/repo/releases/v1.0.0\",\n\ttagName: \"v1.0.0\",\n\tversion: \"1.0.0\",\n\tdetails: \"Release notes content\",\n});\n```\n\n### `fetchRelease`\n\nHelper function to fetch release information from GitHub.\n\n```javascript\nimport { fetchRelease } from \"@humanwhocodes/social-changelog\";\n\n// Fetch latest release\nconst release = await fetchRelease(\"org/repo\");\n\n// Fetch specific release\nconst release = await fetchRelease(\"org/repo\", \"v1.0.0\");\n```\n\nThe release object contains:\n\n- `url` - Release page URL\n- `tagName` - Git tag name\n- `version` - Semantic version\n- `details` - Release notes content\n\n## License\n\nApache 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanwhocodes%2Fsocial-changelog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanwhocodes%2Fsocial-changelog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanwhocodes%2Fsocial-changelog/lists"}