From 9db31129a329b044e48a2b8bf964a8d197e592de Mon Sep 17 00:00:00 2001 From: Lewis Jones Date: Tue, 10 Jun 2025 14:50:54 +0100 Subject: [PATCH 1/2] update codeowners --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index b9181e4..b13d013 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1 @@ -* @advanced-security/advanced-security-dependency-graph @advanced-security/oss-maintainers +* @advanced-security/advanced-security-dependency-graph From cfe815dd6d9d1a1cc88aa82f95196458b58e6756 Mon Sep 17 00:00:00 2001 From: Lewis Jones Date: Tue, 10 Jun 2025 14:51:08 +0100 Subject: [PATCH 2/2] Add fork sync mechanism --- .github/workflows/sync-fork.yml | 42 +++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/sync-fork.yml diff --git a/.github/workflows/sync-fork.yml b/.github/workflows/sync-fork.yml new file mode 100644 index 0000000..e44c325 --- /dev/null +++ b/.github/workflows/sync-fork.yml @@ -0,0 +1,42 @@ +name: Sync Fork with Upstream +on: + schedule: + - cron: '0 0 * * 1' # Runs at midnight UTC every Monday + workflow_dispatch: + +permissions: + contents: write + pull-requests: write + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + - name: Fetch Upstream Remote + run: | + git remote add upstream https://github.com/advanced-security/component-detection-dependency-submission-action.git + git fetch upstream + - name: Set Git Config + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + - name: Create and Push Branch + run: | + git checkout -b weekly-sync-branch-${{ github.run_id }} + git merge upstream/main --no-commit + git reset -- ./.github + git commit -m "Merge upstream:main" + git commit --allow-empty -m "Empty commit to open PR" + git push --set-upstream origin weekly-sync-branch-${{ github.run_id }} + - name: Open Pull Request + run: | + gh repo set-default actions/component-detection-dependency-submission-action + gh pr create -B main -H weekly-sync-branch-${{ github.run_id }} --title 'Sync Fork with Upstream' --body 'Weekly Cron. Created by GitHub Actions.' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}