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

update batching #53

Merged
merged 4 commits into from
Sep 26, 2020
Merged

update batching #53

merged 4 commits into from
Sep 26, 2020

Conversation

thepwagner
Copy link
Owner

This adds support for update batching, which allows arbitrarily combining updates in PR branches.
Previously all updates were pushed to unique branches, and there was some tested but unintegrated code to combine all updates into a single PR.

Batches have names, which are used in the created update branches.
Batches are defined by a set of prefixes for package paths they should include.
The following sample defines a batch named internal that will combine all updates to my own modules.

      - uses: thepwagner/action-update-go@batching
        with:
          batches: |
            internal: github.com/thepwagner

In tackling this I moved branch naming to the RepoUpdater's scope, letting the Repo focus on dumb git operations.
That took with it the path for Repos to enumerate open/closed PRs; which may come back?

Copy link
Owner Author

@thepwagner thepwagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this were a product, I'd miss ignoring closed updates.

The problem is parsing the branch name to determine the ignored dependency falls flat when batching means branch names are no longer indicative of the dependency updated.

I think they come back once they commit message (or maybe PR body?) start including more metadata about the updates.

action.yml Outdated Show resolved Hide resolved
shell: bash
env:
INPUT_BRANCHES: ${{ inputs.branches }}
INPUT_BATCHES: ${{ inputs.batches }}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This took ~10 minutes of WTF to rediscover. The slow kind where you have to push + trigger a workflow each iteration, and everything "just works" outside of Actions.

Tracked in actions/runner#665

cmd/env.go Outdated Show resolved Hide resolved
cmd/env.go Outdated Show resolved Hide resolved
cmd/env_test.go Outdated Show resolved Hide resolved
@thepwagner thepwagner merged commit 3a8a30a into main Sep 26, 2020
@thepwagner thepwagner deleted the batching branch September 26, 2020 11:52
This was referenced Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant