Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sed argument list too long #126

Open
3 of 5 tasks
mathomp4 opened this issue Jul 3, 2023 · 0 comments
Open
3 of 5 tasks

Sed argument list too long #126

mathomp4 opened this issue Jul 3, 2023 · 0 comments
Assignees

Comments

@mathomp4
Copy link

mathomp4 commented Jul 3, 2023

📝 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/action-pull-request@v0.5.5
        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:

TEMPLATE=$(echo -e "${TEMPLATE}" | sed ':a;N;$!ba; s#<!-- Diff commits -->#<!-- Diff commits - START -->\n'"${GIT_LOG}"'\n<!-- Diff commits - END -->#g')

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 GEOS-ESM/MAPL#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. 😄

⚠️ Checklist

  • Provided a clear and concise description of what the issue is.
  • Given a clear and concise description of what is expected.
  • Proposed a clear and concise description of any alternative solutions or other features.
  • 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants