peter-evans / rebase

A GitHub action to rebase pull requests in a repository
MIT License
45 stars 19 forks source link

Feature: skip rebase by name PR #95

Closed splincode closed 3 years ago

splincode commented 3 years ago

We want skip rebase for PR when:

image

splincode commented 3 years ago

new options:

with:
    skip_drafts: true # by default is false
    skip_forks: true # by default is false
    skip_pr_name_pattern:  |
                    '^\[WIP\].+'
                    '^DRAFT-.+'
peter-evans commented 3 years ago

@splincode I've added new features that are available in the latest release v1.2.0 / v1.

To exclude drafts:

      - uses: peter-evans/rebase@v1
        with:
          exclude-drafts: true

To exclude forks use the head filter with a wildcard for the ref.

      - uses: peter-evans/rebase@v1
        with:
          head: 'TinkoffCreditSystems:*'

As for the title pattern idea, I'm not sure if I want to add that feature. There is already an exclude-labels feature that can be used to cover that type of use case. Simply label pull requests with a specific label that you exclude. In a separate workflow you could even automate adding a label to a pull request if the title matches a pattern. I'm sure there are other actions which already can do this.

      - uses: peter-evans/rebase@v1
        with:
          exclude-labels: |
            no-rebase
            dependencies

Thanks for the feature ideas.

splincode commented 3 years ago

thank you very much ))