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

ci(deps): fix git push during yarn.lock deduplication for Dependabot PRs [actions testing PR] #3

Closed
wants to merge 10 commits into from

Commits on Apr 4, 2024

  1. ci(deps): fix git push during yarn.lock deduplication

    - `actions/checkout` runs `git checkout` on a specific commit SHA, meaning there is no "branch" by default, it's on a detached `HEAD`
      - so without a branch specified, it would error out
      - so specify a branch using [GH Actions env vars](https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables)
        - note that `$GITHUB_HEAD_REF` should exist for PRs, and dependabot makes PRs (vs. direct `push`es)
      - use `origin` as the remote name which is the default and also was mentioned in the error message
    
    - also short-circuit the logic if there are no changes to `yarn.lock` (i.e. no deduplication neceessary)
      - this should also be less buggy as the later code will only execute when strictly necessary now (basically, when not needed, returns to the previous behavior before this step existed)
    
    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    9629f66 View commit details
    Browse the repository at this point in the history
  2. test deduplication

    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Apr 4, 2024
    Configuration menu
    Copy the full SHA
    9e2601f View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2024

  1. add write permissions

    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    67a8485 View commit details
    Browse the repository at this point in the history
  2. empty commit test

    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    7c5c6c5 View commit details
    Browse the repository at this point in the history
  3. add fetch-depth

    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    d1a6699 View commit details
    Browse the repository at this point in the history
  4. try in-line fetch

    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    7f5047d View commit details
    Browse the repository at this point in the history
  5. Revert "try in-line fetch"

    This reverts commit 7f5047d.
    
    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    4177c4a View commit details
    Browse the repository at this point in the history
  6. add comment

    Signed-off-by: Anton Gilgur <agilgur5@gmail.com>
    agilgur5 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    c45cfa1 View commit details
    Browse the repository at this point in the history
  7. Merge c45cfa1 into 66d8351

    agilgur5 committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    0bd080b View commit details
    Browse the repository at this point in the history
  8. chore: deduplicate yarn.lock

    Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] committed Apr 5, 2024
    Configuration menu
    Copy the full SHA
    3af611c View commit details
    Browse the repository at this point in the history