wikipathways / wikipathways-development

Roadmap planning, developer documentation, contribution guidelines
2 stars 0 forks source link

Have SyncAction create PRs #124

Open AlexanderPico opened 1 year ago

AlexanderPico commented 1 year ago

Here are some code suggestions from ChatGPT:

- name: Find changed files
  run: |
    CHANGED_FILES=$(git diff --name-only)
    echo "::set-env name=CHANGED_FILES::$CHANGED_FILES"

- name: Create pull requests with:
  env:
    github_token: ${{ secrets.PICOPAT}}
  run: |
    for file in $CHANGED_FILES; do
     filename=$(basename $file)
     git checkout -b "pending-approval-$filename"
         git add $file
     git commit -m 'Test for PR'
     git push -u origin "pending-approval-$filename"
        gh pr create --title "Automatically created pull request for $filename" --template .github/PR_TEMPLATE/gpml-change.yml --base main --head "pending-approval-$filename" || true
     git checkout main
done
AlexanderPico commented 1 year ago

Also consider: