github-community-projects / github-community-projects/safe-settings

Repository variables not working

Open
#820 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
921
Forks
226
Avg merge
18h 3m
Merged PRs (30d)
14

Description

## Problem Description

I followed the repository variable [docs](https://github.com/github/safe-settings/blob/main-enterprise/docs/github-settings/2.%20repository-variables.md) but the variables are not being deployed.

```
repository:
name: safe-settings-test
description: Testing safe-settings
auto_init: true
topics: [safe-settings-test, demo]

variables:
- name: MY_TEST_VAR
value: testvalue
- name: MY_TEST_VAR2
value: testvalue2
```

### What is actually happening

No repository level variables are created. Consolidated config logs the repo vars but never creates the vars.

Example log with some values redacted.
```
DEBUG (probot): consolidated config is {"restrictedRepos":{"exclude":[...], "include":null},"repository":{...},"teams":[...],"custom_properties":[{"name":"safe_settings","value":"true"}],"autolinks":[...],"validator":{"pattern":"[a-z0-9_-]+"},"suborgrepos":["safe-settings-test"],"environments":[{"name":"testenv","variables":[{"name":"SUBORG_VAR","value":"suborg_value"},{"name":"REPO_VAR","value":"repo_value"},{"name":"REPO_VAR2","value":"repo_value2"}]}],"source":"safe-settings/suborgs/test-sub-org.yml","variables":[{"name":"MY_TEST_VAR","value":"testvalue"},{"name":"MY_TEST_VAR2","value":"testvalue2"}]}
DEBUG (probot): Found section teams in the config. Creating plugin...
DEBUG (probot): Found section custom_properties in the config. Creating plugin...
DEBUG (probot): Found section autolinks in the config. Creating plugin...
DEBUG (probot): Found section validator in the config. Creating plugin...
DEBUG (probot): Found section environments in the config. Creating plugin...
DEBUG (probot): Syncing Repo safe-settings-test
```

### What is the expected behavior

MY_TEST_VAR and MY_TEST_VAR2 are created

### Error output, if available

## Context

### Are you using the hosted instance of probot/settings or running your own?

Our own via helm chart.

### If running your own instance, are you using it with github.com or GitHub Enterprise?

github.com

#### Version of probot/settings

2.1.17

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.