Skip to content

PandasWhoCode/configure-custom-properties

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

README for the project Configure Custom Properties

Set and manage GitHub Organization-level Custom Properties via a simple custom_props.json config file.

This action uses the GitHub CLI to apply property schemas automatically, making it easier to standardize metadata across your repositories.


🚀 Getting Started

  1. Create a custom_props.json file in the root of your repository (or another path).
  2. Add this GitHub Action to your workflow.
  3. Run the pipeline to apply the schema at the organization level.

Fine Grained Token Requirements

To run the action within your github CI/CD pipeline you will need to create a fine-grained token with the following permissions:

Organization Permissions

  • Read, Write, and Admin access to organization custom properties

Additional Information


📦 Inputs

Name Description Required Default
token GitHub Personal Access Token (Fine-Grained with Admin: write org scope) ✅ Yes
config-file Path to the custom properties config JSON ✅ Yes custom_props.json

🛠 Usage

jobs:
  update-schema:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: pandaswhocode/configure-custom-properties@v1
        with:
          token: ${{ secrets.GH_ORG_ADMIN_TOKEN }}
          config-file: .github/custom_props.json
          organization: ${{ github.organization }}

Example .github/custom_props.json

custom_props.json:

{
  "properties": [
    {
      "property_name": "single_select_property",
      "value_type": "single_select",
      "allowed_values": [
        "option-1",
        "option-2",
        "option-3",
        "option-4"
      ],
      "description": "Default single select property",
      "values_editable_by": "org_and_repo_actors",
      "required": false
    },
    {
      "property_name": "multi_select_property",
      "value_type": "multi_select",
      "allowed_values": [
        "option-1",
        "option-2",
        "option-3",
        "option-4"
      ],
      "description": "Default multi select property",
      "values_editable_by": "org_and_repo_actors",
      "required": false
    },
    {
      "property_name": "text_property",
      "value_type": "string",
      "description": "Default 'text' property type",
      "values_editable_by": "org_and_repo_actors",
      "required": false
    },
    {
      "property_name": "bool_test",
      "value_type": "true_false",
      "description": "Default true-false property type",
      "values_editable_by": "org_and_repo_actors",
      "required": false
    }
  ]
}

For help generating your custom-props.json file see the documentation for our tool generate-custom-properties.

👤 Author

Roger Barker

PandasWhoCode

[email protected]


About

Github Action to configure github custom properties at the organization level

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •