Skip to content

Commit

Permalink
updating action and script to include specific label, replace third-p…
Browse files Browse the repository at this point in the history
…arty action with gh cli to automerge contributions
  • Loading branch information
lucasmenendez committed Nov 17, 2023
1 parent ecf3c20 commit 2d64818
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/verify-contribution.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ jobs:
run: |
docker build -q -t vocdoni/zk-voceremony --target zk-voceremony .
docker run --rm -qt --env-file ./ceremony.env vocdoni/zk-voceremony verify
merge-contribution:
runs-on: ubuntu-latest
steps:
- name: Auto merge contribution PR
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Merge PR branch
if: success() && contains(github.event.pull_request.labels.*.name, 'automerge')
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git fetch origin ${{ github.base_ref }}
git checkout ${{ github.base_ref }}
git merge --no-ff ${{ github.head_ref }} -m "Automatically merging new contribution"
git push origin ${{ github.base_ref }}
2 changes: 1 addition & 1 deletion scripts/contribute
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ publish_contribution() {
git add $CONTRIBUTIONS_FILE $CURRENT_CONTRIBUTION_FILE && \
git commit -m "$CONTRIBUTOR_NAME contribution to '$CEREMONY_BRANCH' ceremony" && \
git push origin $CEREMONY_BRANCH && \
gh pr create --fill --base $CEREMONY_BRANCH -R $GITHUB_REPO_URL
gh pr create --fill --base $CEREMONY_BRANCH -R $GITHUB_REPO_URL -l automerge
echo
echo "Done! Your contribution has been published!"
echo
Expand Down

0 comments on commit 2d64818

Please sign in to comment.