Skip to content

Add all commits before pushing #309

Closed as not planned
Closed as not planned

Description

@ouuan

Is your feature request related to a problem? Please describe.

Now the bot commits and pushes one by one, and this causes many CI runs (especially when you have multiple files with the contributor list).

You may think I can use the "skip CI" feature, but I'm using the branch protection rules and it requires CI passing for merging.

Describe the solution you'd like

Add all commits (i.e. modify the rc file, change all documents in the "files" array) before pushing.

Describe alternatives you've considered

N/A

Additional context

N/A

Activity

  1. added
    enhancement
    on May 3, 2020
  2. ouuan commented on May 3, 2020

    @ouuan
    ContributorAuthor

    I just found this action. However, it will be better to add all commits before pushing, instead of requiring the CI to support automatic cancellation.

  3. ouuan commented on Jun 9, 2021

    @ouuan
    ContributorAuthor

    It seems that the current implementation uses GitHub API to update the files instead of committing and pushing at local. Maybe this feature request requires a huge refactoring 🤔

  4. gr2m commented on Jun 9, 2021

    @gr2m
    Contributor

    It is possible to combine multiple file changes into one file.

    Can you share an example where it happened? I'm not exactly sure what you mean with one-by-one?

  5. ouuan commented on Jun 9, 2021

    @ouuan
    ContributorAuthor

    Can you share an example where it happened?

    cpeditor/cpeditor#864

  6. gr2m commented on Jun 9, 2021

    @gr2m
    Contributor

    I see, you mean you'd prefer to have a single commit that updates all files at once instead of having separate commits for all the file updates?

  7. ouuan commented on Jun 9, 2021

    @ouuan
    ContributorAuthor

    I see, you mean you'd prefer to have a single commit that updates all files at once instead of having separate commits for all the file updates?

    That's a possible solution. What I want is a single push, which triggers a single CI run. Either a single commit or multiple commits are OK.

    Supposing it's done in the terminal, I want:

    git commit
    git commit
    git push

    instead of:

    git commit
    git push
    git commit
    git push
  8. gr2m commented on Jun 9, 2021

    @gr2m
    Contributor

    We don't do git commands, we use GItHub's APIs, and it doesn't permit to create multiple commits in a single request.

    For the time being, you can use the concurrent setting for your GitHub Action workflows:
    https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency

    You can set it that a workflow should only run once for the same pull request, and cancel a run if it was superseded by a new commit.

  9. tenshiAMD commented on Sep 25, 2022

    @tenshiAMD
    Member

    @ouuan I think you can use CLI instead for you use case. Closing this for now.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions