Skip to content

Hey Jeff! Use this script to automatically merge all the PR'sΒ #379

@onlyamessenger

Description

@onlyamessenger

Hi @codediodeio ,

Pretty sure you don't want to manually merge all these PR's. So you can use the below bash script to do some of the heavy lifting. You'll need to modify it for your decryption step to be automated as well, but this should be a good starting point.

Disclaimer: The auto merging will only work if there aren't any merge conflicts, so here's hoping 🀞🏻

# List all pull requests to master and grab the first half (before space) of each line
git ls-remote origin 'pull/*/head' | awk '{print $1}' |
# Loop through all the lines
while read ref; do
  # Clean up the line
  pr=$(echo $ref | cut -d/ -f3)
  echo "Attempting to automatically merge and decrypt from pull request $ref"
  # Merge the PR automagically (if it is valid)
  git merge --no-ff $ref -m "Auto merge of pull request $ref"
done
# Once everything is merged, loop through all text files in stickers dir
for entry in stickers/*
do
  echo "Attempting to decrypt $entry"
  # Maybe your script should take a file name as an arg? Then you can use the below
  address=$(npm run test --someArg $entry)
  # Do something with your decrypted address :)
  echo $address
done

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions