nnichols / clojure-dependency-update-action

[MAINTENANCE ONLY]: A simple GitHub Actions job to create Pull Requests for outdated dependencies in clojure projects
MIT License
40 stars 7 forks source link

version 4 fails to parse upgrades from the upgrade list #10

Open jennet opened 2 years ago

jennet commented 2 years ago

Bug Report

Describe the Bug

I get an empty $UPGRADES value when running the v4 action. This causes the action to fail with a red herring gh pr create error.

Your branch is up to date with 'origin/master'.
unknown argument "master"; please quote all values that have spaces

Usage:  gh pr create [flags]

Flags:
  -a, --assignee login    Assign people by their login
  -B, --base branch       The branch into which you want your code merged
  -b, --body string       Body for the pull request
  -d, --draft             Mark pull request as a draft
  -f, --fill              Do not prompt for title/body and just use commit info
  -H, --head branch       The branch that contains commits for your pull request (default: current branch)
  -l, --label name        Add labels by name
  -m, --milestone name    Add the pull request to a milestone by name
  -p, --project name      Add the pull request to projects by name
      --recover string    Recover input from a failed run of create
  -r, --reviewer handle   Request reviews from people or teams by their handle
  -t, --title string      Title for the pull request
  -w, --web               Open the web browser to create a pull request

It appears to be caused by the use of the string output of the command's eval rather than the direct output, as after a bit of poking around in the script, this line change fixed the problem

Steps to Reproduce

Steps to reproduce the behavior:

My repo settings were:

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - name: Checkout Latest Commit
      uses: actions/checkout@v2.3.4

    - name: Check deps
      uses: nnichols/clojure-dependency-update-action@v4
      with:
        directories: api
        batch: true
        branch: master
        github-token: ${{ secrets.github_token }}

Expected Behavior

The script to successfully parse and run upgrades and diffs for each upgrade found, then to switch to a new branch and create a PR.