Update sync configuration#69
Conversation
Summary by CodeRabbit
WalkthroughUpdated repository sync configuration and added synchronization metadata/comments: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/sync.yml:
- Around line 3-7: The sync currently includes the workflow bots-auto-merge.yaml
but all target repos lack the required secrets OBSINT_PROCESSING_APP_CLIENT_ID
and OBSINT_PROCESSING_APP_PRIVATE_KEY, so either provision those two secrets to
every target repo before syncing or remove/exclude bots-auto-merge.yaml from the
sync config and keep linters.yaml; update the sync configuration to remove the
source entry for bots-auto-merge.yaml (or add an exclusion) so only compatible
workflows (e.g., linters.yaml) are synced until the secrets are provisioned.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7d6e9b18-a753-42a2-8e30-8c0965c8300a
📒 Files selected for processing (1)
.github/sync.yml
| - renovate.json | ||
| - source: workflows_examples/linters.yaml | ||
| dest: .github/workflows/linters.yaml | ||
| - source: workflows_examples/bots-auto-merge.yaml | ||
| dest: .github/workflows/bots-auto-merge.yaml |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Verify prerequisites for repos listed in .github/sync.yml:
# 1) default branch is main/master (for push trigger coverage in linters workflow)
# 2) required secrets exist for bots auto-merge workflow
repos=$(awk '/^RedHatInsights\// {gsub(":", "", $1); print $1}' .github/sync.yml)
printf "repo,default_branch,push_trigger_covered,has_client_id_secret,has_private_key_secret\n"
for repo in $repos; do
default_branch=$(gh api "repos/$repo" --jq '.default_branch' 2>/dev/null || echo "UNKNOWN")
if [[ "$default_branch" == "main" || "$default_branch" == "master" ]]; then
covered="yes"
else
covered="no"
fi
secret_names=$(gh api "repos/$repo/actions/secrets?per_page=100" --jq '.secrets[].name' 2>/dev/null || true)
if printf "%s\n" "$secret_names" | grep -qx 'OBSINT_PROCESSING_APP_CLIENT_ID'; then
has_client_id="yes"
else
has_client_id="no"
fi
if printf "%s\n" "$secret_names" | grep -qx 'OBSINT_PROCESSING_APP_PRIVATE_KEY'; then
has_private_key="yes"
else
has_private_key="no"
fi
printf "%s,%s,%s,%s,%s\n" "$repo" "$default_branch" "$covered" "$has_client_id" "$has_private_key"
doneRepository: RedHatInsights/processing-tools
Length of output: 1378
Syncing workflows_examples/bots-auto-merge.yaml will fail in all target repos—required secrets are missing.
The verification shows all 21 target repos lack the required secrets OBSINT_PROCESSING_APP_CLIENT_ID and OBSINT_PROCESSING_APP_PRIVATE_KEY. The bots-auto-merge.yaml workflow will fail at runtime in every repo. Either provision these secrets to all target repos first, or exclude this workflow from the sync until prerequisites are met.
The workflows_examples/linters.yaml workflow is compatible (all repos use main or master as default branch).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/sync.yml around lines 3 - 7, The sync currently includes the
workflow bots-auto-merge.yaml but all target repos lack the required secrets
OBSINT_PROCESSING_APP_CLIENT_ID and OBSINT_PROCESSING_APP_PRIVATE_KEY, so either
provision those two secrets to every target repo before syncing or
remove/exclude bots-auto-merge.yaml from the sync config and keep linters.yaml;
update the sync configuration to remove the source entry for
bots-auto-merge.yaml (or add an exclusion) so only compatible workflows (e.g.,
linters.yaml) are synced until the secrets are provisioned.
43943ce to
0a2fbb8
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/sync.yml:
- Around line 65-71: The new sync target RedHatInsights/insights-core-messaging
adds a synced workflow file bots-auto-merge.yaml but the required secrets
OBSINT_PROCESSING_APP_CLIENT_ID and OBSINT_PROCESSING_APP_PRIVATE_KEY are
missing; provision these two secrets in the target repository's GitHub settings
(Repository > Settings > Secrets) before deploying the sync so
bots-auto-merge.yaml can access them, and verify the secret names exactly match
OBSINT_PROCESSING_APP_CLIENT_ID and OBSINT_PROCESSING_APP_PRIVATE_KEY used by
the workflow.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 36429533-2f8d-42d2-8699-39fe90455078
📒 Files selected for processing (5)
.github/sync.ymlCODEOWNERSrenovate.jsonworkflows_examples/bots-auto-merge.yamlworkflows_examples/linters.yaml
✅ Files skipped from review due to trivial changes (4)
- renovate.json
- CODEOWNERS
- workflows_examples/bots-auto-merge.yaml
- workflows_examples/linters.yaml
| RedHatInsights/insights-core-messaging: | ||
| - CODEOWNERS | ||
| - renovate.json | ||
| - source: workflows_examples/linters.yaml | ||
| dest: .github/workflows/linters.yaml | ||
| - source: workflows_examples/bots-auto-merge.yaml | ||
| dest: .github/workflows/bots-auto-merge.yaml |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Verify the new repository exists and check its default branch
repo="RedHatInsights/insights-core-messaging"
echo "Checking repository: $repo"
# Get repo info
repo_info=$(gh api "repos/$repo" 2>/dev/null || echo "NOT_FOUND")
if [[ "$repo_info" == "NOT_FOUND" ]]; then
echo "ERROR: Repository $repo does not exist or is not accessible"
exit 1
fi
default_branch=$(echo "$repo_info" | jq -r '.default_branch')
echo "Default branch: $default_branch"
if [[ "$default_branch" == "main" || "$default_branch" == "master" ]]; then
echo "✓ Default branch is compatible with linters.yaml push trigger"
else
echo "⚠ Default branch '$default_branch' may not be covered by linters.yaml push trigger (expects main or master)"
fi
# Check for required secrets (will likely show 'no' until provisioned)
echo ""
echo "Checking secrets (expected to be missing until provisioned):"
secret_names=$(gh api "repos/$repo/actions/secrets?per_page=100" --jq '.secrets[].name' 2>/dev/null || echo "")
for secret in OBSINT_PROCESSING_APP_CLIENT_ID OBSINT_PROCESSING_APP_PRIVATE_KEY; do
if printf "%s\n" "$secret_names" | grep -qx "$secret"; then
echo "✓ $secret: present"
else
echo "✗ $secret: missing"
fi
doneRepository: RedHatInsights/processing-tools
Length of output: 369
Provision required secrets for the new sync target before deployment.
The new sync target RedHatInsights/insights-core-messaging exists with a compatible default branch (master). However, the required secrets for the bots-auto-merge.yaml workflow are currently missing:
OBSINT_PROCESSING_APP_CLIENT_IDOBSINT_PROCESSING_APP_PRIVATE_KEY
These secrets must be provisioned in the repository before the synced workflow can function.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/sync.yml around lines 65 - 71, The new sync target
RedHatInsights/insights-core-messaging adds a synced workflow file
bots-auto-merge.yaml but the required secrets OBSINT_PROCESSING_APP_CLIENT_ID
and OBSINT_PROCESSING_APP_PRIVATE_KEY are missing; provision these two secrets
in the target repository's GitHub settings (Repository > Settings > Secrets)
before deploying the sync so bots-auto-merge.yaml can access them, and verify
the secret names exactly match OBSINT_PROCESSING_APP_CLIENT_ID and
OBSINT_PROCESSING_APP_PRIVATE_KEY used by the workflow.
Description
New repo-file-sync configuration will:
renovate.jsonin all the repositories (it mostly affects to the enable-auto-merge in most of the cases)linters.yamlinto the workflows, using the reusable workflow from now on. In most of the cases, just updating the version tag.bots-auto-merge.yamlworkflow to use thebots-auto-merge.yamlreusable workflow from this repository.Review this change carefully, as it will be synced across ALL our repositories and those PRs will be (hopefully) automerged with further human review when the status checks pass.
Type of change
Testing steps
N/A