{"id":19654387,"url":"https://github.com/0xry4n/segment-function-sync","last_synced_at":"2026-06-10T03:31:27.810Z","repository":{"id":223602235,"uuid":"761006459","full_name":"0xRy4n/segment-function-sync","owner":"0xRy4n","description":"A template repository for automatically creating and updating Segment Functions via GitHub.","archived":false,"fork":false,"pushed_at":"2024-02-21T18:37:11.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T01:54:36.734Z","etag":null,"topics":["segment","segmentio","version-control","workflows"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xRy4n.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-02-21T04:01:35.000Z","updated_at":"2024-02-21T04:43:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"d0754049-492e-448a-8bac-342997668ac7","html_url":"https://github.com/0xRy4n/segment-function-sync","commit_stats":null,"previous_names":["0xry4n/segment-function-sync"],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/0xRy4n/segment-function-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fsegment-function-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fsegment-function-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fsegment-function-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fsegment-function-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xRy4n","download_url":"https://codeload.github.com/0xRy4n/segment-function-sync/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xRy4n%2Fsegment-function-sync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34136112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"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":["segment","segmentio","version-control","workflows"],"created_at":"2024-11-11T15:17:09.830Z","updated_at":"2026-06-10T03:31:27.805Z","avatar_url":"https://github.com/0xRy4n.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Segment Function Sync\n\n## GitHub Version Control for Segment Functions\n\nThis repository is a template repository that includes GitHub Action automations to automatically create and update *Segment Functions* via the Segment Public API.\n\nUnlike similar repositories, the automation within this repository automatically detects functions within the repository, identifies them on Segment (if they exist), and either updates or creates them accordingly. There is no need to manually configure each function in the YAML or anywhere else.\n\n### Usage\n\n1. Clone the repository as is, create a new repository from this template, or copy it's entire contents barring this README and the LICENSE file into your repository.\n2. You must setup your repository with a `SEGMENT_TOKEN` secret containing an API key for the Segment Public API.\n\nThe repository has three directories representing the different types of Segment Functions:\n\n1. `source` - Source Functions\n2. `destination` - Destination Functions\n3. `insert` - Destination Insert Functions\n\nYou must place your files into the correct folder that corresponds with the function type. \n\n**The first line of all files MUST contain a comment with the function display name (as shown in Segment UI), like so:**\n\n```\n// FUNCTION_NAME: Test Function\n\n// Your Code Here\n```\n\nThe automation within `.github/workflows/updateOrCreateFunction.js` will attempt to see if there is a matching function within segment based on the function name and type. If yes, it will update that function. If no, it will create a new function. Afterwards, it will deploy the function.\n\nBy default the `main.yml` is configured to do this on the `main` or `master` branches.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xry4n%2Fsegment-function-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xry4n%2Fsegment-function-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xry4n%2Fsegment-function-sync/lists"}