Skip to content

Repository variables not working #820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
cdav opened this issue Apr 30, 2025 · 2 comments
Open

Repository variables not working #820

cdav opened this issue Apr 30, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@cdav
Copy link

cdav commented Apr 30, 2025

Problem Description

I followed the repository variable docs 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

@cdav cdav added the bug Something isn't working label Apr 30, 2025
@cdav
Copy link
Author

cdav commented Apr 30, 2025

It is unclear if repository variables are supported. The docs say they are but there are multiple PRs open for adding support.

#819
#635

@PendaGTP
Copy link
Contributor

Hi @cdav, yes currently only environment variables are supported. GitHub Actions variables are not yet supported. PR you link is for adding GH Actions variables, what I think you need.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants