Skip to content

Upstream PRs from OSP + OOC #14

Upstream PRs from OSP + OOC

Upstream PRs from OSP + OOC #14

Workflow file for this run

name: Upstream PRs from OSP + OOC
# Collects open PRs from mirror orgs (OSP, OOC) and opens matching PRs in
# Interested-Deving-1896 (source of truth) with auto-merge enabled.
#
# Schedule: runs at :30 each hour, between the two mirror syncs (:00 and :15),
# so any PR merged upstream will be reflected in mirrors within the same hour.
on:
schedule:
- cron: "30 * * * *"
workflow_dispatch:
inputs:
repo_filter:
description: "Repo name substring filter (blank = all)"
required: false
default: ""
dry_run:
description: "Dry run — detect PRs without opening upstream PRs"
type: boolean
required: false
default: false
mirror_orgs:
description: "Space-separated mirror orgs to scan (blank = both OSP and OOC)"
required: false
default: ""
permissions:
contents: write
pull-requests: write
id-token: write # Added permission for id-token
# ── Rate limits ──────────────────────────────────────────────────────────────
# GitHub REST API (SYNC_TOKEN): 5 000 req/hr primary limit.
# upstream-prs.sh retries HTTP 403/429 up to 3 times with reset-aware sleep.
# Runs hourly at :30 — offset from other hourly workflows to spread usage.
jobs:
upstream-prs:
name: Upstream PRs → Interested-Deving-1896
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Upstream open PRs from OSP and OOC
env:
GH_TOKEN: ${{ secrets.SYNC_TOKEN }}
UPSTREAM_OWNER: Interested-Deving-1896
MIRROR_ORGS: >-
${{
inputs.mirror_orgs != '' && inputs.mirror_orgs ||
'OpenOS-Project-OSP OpenOS-Project-Ecosystem-OOC'
}}
REPO_FILTER: ${{ inputs.repo_filter || '' }}
DRY_RUN: ${{ inputs.dry_run || 'false' }}
run: bash scripts/upstream-prs.sh
- name: Write summary
if: always()
env:
JOB_STATUS: ${{ job.status }}
INPUTS_JSON: ${{ toJSON(inputs) }}
run: bash scripts/write-summary.sh