{"id":15048139,"url":"https://github.com/github/entitlements-github-plugin","last_synced_at":"2025-04-09T14:15:24.888Z","repository":{"id":37503228,"uuid":"500915777","full_name":"github/entitlements-github-plugin","owner":"github","description":"Entitlements plugin to manage GitHub Orgs and Team memberships and access","archived":false,"fork":false,"pushed_at":"2025-03-13T16:53:19.000Z","size":38641,"stargazers_count":23,"open_issues_count":4,"forks_count":6,"subscribers_count":39,"default_branch":"main","last_synced_at":"2025-04-02T08:43:39.514Z","etag":null,"topics":["entitlements","github","iam","security"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/entitlements-github-plugin","language":"Ruby","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/github.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":"2022-06-07T16:17:16.000Z","updated_at":"2025-03-13T16:52:31.000Z","dependencies_parsed_at":"2023-12-22T20:56:50.049Z","dependency_job_id":"d85e5a35-49a0-4732-8e98-8bb2f31d5b8c","html_url":"https://github.com/github/entitlements-github-plugin","commit_stats":{"total_commits":72,"total_committers":7,"mean_commits":"10.285714285714286","dds":0.5833333333333333,"last_synced_commit":"afbcaa42e02cd4ff34a289231c51b10c014280dc"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fentitlements-github-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fentitlements-github-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fentitlements-github-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fentitlements-github-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/entitlements-github-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054193,"owners_count":21039952,"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":["entitlements","github","iam","security"],"created_at":"2024-09-24T21:08:32.504Z","updated_at":"2025-04-09T14:15:24.871Z","avatar_url":"https://github.com/github.png","language":"Ruby","readme":"# entitlements-github-plugin\n\n[![acceptance](https://github.com/github/entitlements-github-plugin/actions/workflows/acceptance.yml/badge.svg)](https://github.com/github/entitlements-github-plugin/actions/workflows/acceptance.yml) [![test](https://github.com/github/entitlements-github-plugin/actions/workflows/test.yml/badge.svg)](https://github.com/github/entitlements-github-plugin/actions/workflows/test.yml) [![lint](https://github.com/github/entitlements-github-plugin/actions/workflows/lint.yml/badge.svg)](https://github.com/github/entitlements-github-plugin/actions/workflows/lint.yml) [![release](https://github.com/github/entitlements-github-plugin/actions/workflows/release.yml/badge.svg)](https://github.com/github/entitlements-github-plugin/actions/workflows/release.yml) [![build](https://github.com/github/entitlements-github-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/github/entitlements-github-plugin/actions/workflows/build.yml) [![coverage](https://img.shields.io/badge/coverage-100%25-success)](https://img.shields.io/badge/coverage-100%25-success) [![style](https://img.shields.io/badge/code%20style-rubocop--github-blue)](https://github.com/github/rubocop-github)\n\n`entitlements-github-plugin` is an [entitlements-app](https://github.com/github/entitlements-app) plugin allowing entitlements configs to be used to manage membership of GitHub.com Organizations and Teams.\n\n## Usage\n\nYour `entitlements-app` config `config/entitlements.yaml` runs through ERB interpretation automatically. You can extend your entitlements configuration to load plugins like so:\n\n```ruby\n\u003c%-\n  unless ENV['CI_MODE']\n    begin\n      require_relative \"/data/entitlements/lib/entitlements-and-plugins\"\n    rescue Exception\n      begin\n        require_relative \"lib/entitlements-and-plugins\"\n      rescue Exception\n        # We might not have the plugins installed and still want this file to be\n        # loaded. Don't raise anything but silently fail.\n      end\n    end\n  end\n-%\u003e\n```\n\nYou can then define `lib/entitlements-and-plugins` like so:\n\n```ruby\n#!/usr/bin/env ruby\n# frozen_string_literal: true\n\nENV[\"BUNDLE_GEMFILE\"] = File.expand_path(\"../../Gemfile\", File.dirname(__FILE__))\nrequire \"bundler/setup\"\nrequire \"entitlements\"\n\n# require entitlements plugins here\nrequire \"entitlements/backend/github_org\"\nrequire \"entitlements/backend/github_team\"\nrequire \"entitlements/service/github\"\n```\n\nAny plugins defined in `lib/entitlements-and-plugins` will be loaded and used at `entitlements-app` runtime.\n\n## Features\n\n### Org Team\n\n`entitlements-github-plugin` manages org team membership to two roles - `admin` and `member`. Your `entitlements-app` config `config/entitlements.yaml` is used to configure the location for the declarations of this membership.\n\n```ruby\n  github.com/github/org:\n    addr: \u003c%= ENV[\"GITHUB_API_BASE\"] %\u003e\n    base: ou=org,ou=github,ou=GitHub,dc=github,dc=com\n    dir: github.com/github/org\n    org: github\n    token: \u003c%= ENV[\"GITHUB_ORG_TOKEN\"] %\u003e\n    ignore_not_found: false # optional argument to ignore users who are not found in the GitHub instance\n    type: \"github_org\"\n```\n\n`entitlements-github-plugin` will look in the defined location above, `github.com/github/org`, for `admin.txt` and `member.txt` defining the respective membership for each role.\n\n### GitHub Teams\n\n`entitlements-github-plugin` manages membership for all teams listed in the defined subfolder. The plugin will use extension-less name of the file as the team name. GitHub Team management can be configured like so:\n\n```ruby\n  github.com/github/teams:\n    addr: \u003c%= ENV[\"GITHUB_API_BASE\"] %\u003e\n    base: ou=teams,ou=github,ou=GitHub,dc=github,dc=com\n    dir: github.com/github/teams\n    org: github\n    token: \u003c%= ENV[\"GITHUB_ORG_TOKEN\"] %\u003e\n    ignore_not_found: false # optional argument to ignore users who are not found in the GitHub instance\n    type: \"github_team\"\n```\n\nFor example, if there were a file `github.com/github/teams/new-team.txt` with a single user inside, a GitHub.com Team would be created in the `github` org with the name `new-team`.\n\n#### Metadata\n\nEntitlements configs can contain metadata which the plugin will use to make further configuration decisions.\n\n`metadata_parent_team_name` - when defined in an entitlements config, the defined team will be made the parent team of this GitHub.com Team.\n\n## Release 🚀\n\nTo release a new version of this Gem, do the following:\n\n1. Update the version number in the [`lib/version.rb`](lib/version.rb) file\n2. Run `bundle install` to update the `Gemfile.lock` file with the new version\n3. Commit your changes, push them to GitHub, and open a PR\n\nOnce your PR is approved and the changes are merged, a new release will be created automatically by the [`release.yml`](.github/workflows/release.yml) workflow. The latest version of the Gem will be published to the GitHub Package Registry and RubyGems.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fentitlements-github-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fentitlements-github-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fentitlements-github-plugin/lists"}