From 4d081500af00ca921eea50b975ae0aa9f4418c2b Mon Sep 17 00:00:00 2001 From: Ikechukwu Uchendu Date: Wed, 27 Sep 2023 09:41:22 -0400 Subject: [PATCH] Auto contributors will now try to merge with main before pushing --- .github/workflows/auto-add-contributors.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-add-contributors.yml b/.github/workflows/auto-add-contributors.yml index 706d0693f..c4f2d8118 100644 --- a/.github/workflows/auto-add-contributors.yml +++ b/.github/workflows/auto-add-contributors.yml @@ -51,6 +51,11 @@ jobs: npx all-contributors generate git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" + + # Fetch the latest state of the master branch and try to rebase + git fetch origin main + git merge origin main + git add -u git diff-index --quiet HEAD || git commit -m "Update readme and contributors.qmd with contributors" - git push \ No newline at end of file + git push