Open
Description
Problem Description
I'm trying to configure save-settings to create a new repo for me.
This is my config
# save-settings/repos/test-please-ignore.yml
repository:
# Create the repo if doesn't exist
force_create: true
name: test-please-ignore
private: true
organization: my-org
description: "test please ignore"
# save-settings/suborgs/test.yml
suborgrepos:
- 'test-please-ignore'
rulesets:
- name: Default
target: branch
enforcement: active
conditions:
ref_name:
include:
- ~DEFAULT_BRANCH
exclude: []
rules:
- type: deletion
- type: non_fast_forward # prevents force pushes
- name: Pull Requests
target: branch
enforcement: active
conditions:
ref_name:
include:
- ~DEFAULT_BRANCH
exclude: []
# save-settings/deployment-settings.yml
restrictedRepos:
include: ['^test-please-ignore$', 'rust-ci-test']
# save-settings/settings.yml
repository:
topics:
- foobar
# workflow file
name: Safe Settings Sync
on:
# schedule:
# - cron: "0 */4 * * *"
workflow_dispatch: {}
push:
branches:
- main
jobs:
safeSettingsSync:
runs-on: ubuntu-latest
environment: "main"
env:
# Version/tag of github/safe-settings repo to use:
SAFE_SETTINGS_VERSION: 2.1.16
# Path on GHA runner box where safe-settings code downloaded to:
SAFE_SETTINGS_CODE_DIR: ${{ github.workspace }}/.safe-settings-code
steps:
# Self-checkout of 'admin' repo for access to safe-settings config:
- uses: actions/checkout@v4
# Checkout of safe-settings repo for running full sync:
- uses: actions/checkout@v4
with:
repository: github/safe-settings
ref: ${{ vars.SAFE_SETTINGS_VERSION || '2.1.16' }}
path: ${{ github.workspace }}/.safe-settings-code
- uses: actions/setup-node@v4
- run: npm install
working-directory: ${{ github.workspace }}/.safe-settings-code
- run: npm run full-sync
working-directory: ${{ github.workspace }}/.safe-settings-code
env:
GH_ORG: ${{ vars.SAFE_SETTINGS_GH_ORG }}
APP_ID: ${{ vars.SAFE_SETTINGS_APP_ID }}
PRIVATE_KEY: ${{ secrets.SAFE_SETTINGS_PRIVATE_KEY }}
GITHUB_CLIENT_ID: ${{ vars.SAFE_SETTINGS_GITHUB_CLIENT_ID }}
GITHUB_CLIENT_SECRET: ${{ secrets.SAFE_SETTINGS_GITHUB_CLIENT_SECRET }}
ADMIN_REPO: admin
CONFIG_PATH: safe-settings
DEPLOYMENT_CONFIG_FILE: ${{ github.workspace }}/safe-settings/deployment-settings.yml
LOG_LEVEL: trace
What is actually happening
Repository is not created and error is thrown.
modifying existing repos is successfull
What is the expected behavior
Repository created, no error
Error output, if available
...
DEBUG (probot): Allowing rust-ci-test in restrictedRepos.include [^test-please-ignore$,rust-ci-test]
DEBUG (probot): Allowing test-please-ignore in restrictedRepos.include [^test-please-ignore$,rust-ci-test]
DEBUG (probot): Process normally... Not a SubOrg config change or SubOrg config was changed and this repo is part of it. {"owner":"my-org","repo":"test-please-ignore"} suborg config undefined
DEBUG (github): GitHub request: GET https://api.github.com/repos/my-org/test-please-ignore - 404
ERROR (probot): Not Found
DEBUG (probot): Not run in nop
...
Context
Are you using the hosted instance of probot/settings or running your own?
I'm using github actions on github.com.
If running your own instance, are you using it with github.com or GitHub Enterprise?
Version of probot/settings
2.1.16