diff --git a/.github/workflows/mirror_noir_subrepo.yml b/.github/workflows/mirror_noir_subrepo.yml index 7ab041face2..e8cc0569d79 100644 --- a/.github/workflows/mirror_noir_subrepo.yml +++ b/.github/workflows/mirror_noir_subrepo.yml @@ -13,8 +13,8 @@ on: branches: - master paths: - - 'noir/**' - - '!noir/.gitrepo' + - "noir/noir-repo/**" + - "!noir/noir-repo/.gitrepo" jobs: mirror_repo: @@ -35,7 +35,7 @@ jobs: # Do we have a PR active? PR_URL=$(gh pr list --repo noir-lang/noir --head aztec-packages --json url --jq ".[0].url") echo "PR_URL=$PR_URL" >> $GITHUB_ENV - + - name: Generate PR body run: | set -xue # print commands @@ -47,7 +47,7 @@ jobs: AZTEC_SYNC_COMMIT="a7889f8d21684099306b72a87e0fb57b3bba0cb4" fi # Create a filtered git log for release-please changelog / metadata - RAW_MESSAGE=$(git log --pretty=format:"%s" $AZTEC_SYNC_COMMIT..HEAD -- noir/ ':!noir/.gitrepo' | grep -v 'git subrepo' || true) + RAW_MESSAGE=$(git log --pretty=format:"%s" $AZTEC_SYNC_COMMIT..HEAD -- noir/noir-repo/ ':!noir/noir-repo/.gitrepo' | grep -v 'git subrepo' || true) # Fix Aztec PR links and output message echo "$RAW_MESSAGE" | sed -E 's/\(#([0-9]+)\)/(https:\/\/github.com\/AztecProtocol\/aztec-packages\/pull\/\1)/g' } @@ -73,7 +73,7 @@ jobs: # otherwise we first reset our staging branch STAGING_BRANCH=$BRANCH-staging fi - BASE_NOIR_COMMIT=`git config --file=noir/.gitrepo subrepo.commit` + BASE_NOIR_COMMIT=`git config --file=noir/noir-repo/.gitrepo subrepo.commit` COMMIT=$(git rev-parse HEAD) COMMIT_MESSAGE=$(git log -1 --pretty=format:%B) @@ -91,7 +91,7 @@ jobs: } # force_sync_staging: Push to our aztec-packages staging branch. function force_sync_staging() { - echo "$COMMIT" > noir/.aztec-sync-commit && git add noir/.aztec-sync-commit + echo "$COMMIT" > noir/noir-repo/.aztec-sync-commit && git add noir/noir-repo/.aztec-sync-commit # make a new commit with our previous message git commit -am "$COMMIT_MESSAGE" # Now push to it with subrepo with computed commit messages @@ -122,7 +122,7 @@ jobs: - name: Update PR run: | set -xue # print commands - # Formatted for updating the PR, overrides for release-please commit message parsing + # Formatted for updating the PR, overrides for release-please commit message parsing PR_BODY="""BEGIN_COMMIT_OVERRIDE $(cat .PR_BODY_MESSAGE) END_COMMIT_OVERRIDE""" diff --git a/README.md b/README.md index 59ddc1cf72f..54e33a327d6 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ There is an automatic mirror pushing noir to a PR on noir side. If the mirror is Recovering if the sync is not happening with basic pull commands: -- manually editing the commit variable in noir/.gitrepo: +- manually editing the commit variable in noir/noir-repo/.gitrepo: this needs to exist in the branch we push to, and have the same content as our base. This is similar to submodules, except instead of pointing to the final state of the module, it points to the last commit we have sync'd from, for purposes of commit replay. This can be fixed to match the commit in master after merges. -- manually editing the parent variable in noir/.gitrepo: this is the parent of the last sync commit on aztec side. If you get errors with a commit not being found in the upstream repo, and the commit mentioned is not the commit variable above, it might indicate this is somehow incorrect. This can happen when commit content is ported without its history, e.g. squashes +- manually editing the parent variable in noir/noir-repo/.gitrepo: this is the parent of the last sync commit on aztec side. If you get errors with a commit not being found in the upstream repo, and the commit mentioned is not the commit variable above, it might indicate this is somehow incorrect. This can happen when commit content is ported without its history, e.g. squashes - use pull --force ONLY where you would use git reset. That is, if you really want to match some upstream noir for a purpose its fine, but you'll lose local changes (if any)