action-pull-request icon indicating copy to clipboard operation
action-pull-request copied to clipboard

Sed argument list too long

Open mathomp4 opened this issue 2 years ago • 0 comments

:memo: Brief description

So I have been merrily using this action to create a PR whenever there is a push to our develop branch with this bit of yaml I think I took from the main page here:

      - name: Run the action
        uses: devops-infra/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          source_branch: develop
          target_branch: release/MAPL-v3
          label: automatic,MAPL3,Skip Changelog
          template: .github/PULL_REQUEST_TEMPLATE/auto_pr_to_mapl3.md
          get_diff: true
          assignee: ${{ github.actor }}
          old_string: "<!-- Write your description here -->"
          new_string: ${{ github.event.commits[0].message }}
          title: Auto PR - develop → MAPL-v3 - ${{ github.event.commits[0].message }}

But in the last couple of days the action has been failing (example) with:

/entrypoint.sh: line 127: /usr/bin/sed: Argument list too long

and it seems like this:

https://github.com/devops-infra/action-pull-request/blob/7865511e6384f0d7cbc73750f678ea97b7dbe14d/entrypoint.sh#L127

got too long. This MAPL3 branch is a very long lived development branch (development on top of develop) and so I can imagine we might finally be blowing it out.

Now, we don't actually use the commits bit from line 127 in our template:

## :memo:  Automatic PR: `develop` → `release/MAPL-v3`

### Description

<!-- Write your description here -->

## :file_folder:  Modified files
<!-- Diff files - START -->
<!-- Diff files - END -->

to make PRs like https://github.com/GEOS-ESM/MAPL/pull/2212 so this explains why I've never seen commits in them, but I do like seeing the files that changed.

Is there anything I can do to "bypass" the commit-diff? Or do I need to just go full get_diff: false from now on? (And if so, what does the automatic PR then look like...)

Or, perhaps, if desired, would you be amenable to a PR that did finer grained get_diff options (e.g., git_diff_commits or something?) I can maybe see how to do it but GitHub Actions are also pretty mysterious to me. 😄

:warning: Checklist

  • [x] Provided a clear and concise description of what the issue is.
  • [x] Given a clear and concise description of what is expected.
  • [ ] Proposed a clear and concise description of any alternative solutions or other features.
  • [x] Added any other context or screenshots about the feature request.
  • [ ] Associated pull request has been already created and link was provided.

Check CONTRIBUTING.md and CODE_OF_CONDUCT.md for more information

mathomp4 avatar Jul 03 '23 13:07 mathomp4