Git Product home page Git Product logo

update-branch's Introduction

Hi there πŸ‘‹

update-branch's People

Contributors

dependabot[bot] avatar lcdsmao avatar sindrig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sindrig

update-branch's Issues

Cannot read property 'contexts' of null

I receive an error "Cannot read property 'contexts' of null" during exectuion of "update-branch" action.

This action only has effect if you enabled Settings/Branches/YourBranchProtectionRule/Require status checks to pass before merging/Require branches to be up to date before merging.

Done

Enable Allow auto-merge in Settings/Options.

Done

Configuration:

name: Update branch

on:
  push:
    branches:
      - rel_lurbanski
  pull_request:
    types:
      - labeled
  check_suite:
    types:
      - completed

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:
  update-branch:
    runs-on: self-hosted
    steps:
      - uses: lcdsmao/[email protected]
        with:
          # Or use personal access token
          token: ${{ secrets.GITHUB_TOKEN }}
          # One of MERGE, SQUASH, REBASE (default: MERGE)
          autoMergeMethod: SQUASH
          # Ignore pull requests without these labels
          requiredLabels: auto-merge
          # Required at least 2 approves (default: 0)
          requiredApprovals: 2
          # Required these status checks success
          requiredStatusChecks: |
            Dummy_build
            WIP

Full logs:

##[debug]Evaluating condition for step: 'Run lcdsmao/[email protected]'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run lcdsmao/[email protected]
##[debug]Loading inputs
##[debug]Evaluating: secrets.GITHUB_TOKEN
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'GITHUB_TOKEN'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
Run lcdsmao/[email protected]
Condition:
{
  "requiredApprovals": [2](https://github.com/equinix-product/iam-rssi/runs/5448341429?check_suite_focus=true#step:2:2),
  "requiredStatusChecks": [
    "Dummy_build",
    "WIP"
  ],
  "requiredLabels": [
    "auto-merge"
  ]
}
Error: Cannot read property 'contexts' of null
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Run lcdsmao/update-branch@v[3](https://github.com/equinix-product/iam-rssi/runs/5448341429?check_suite_focus=true#step:2:3).1.3

Extend README.md of using scenarios.

Please extend README.dm of using scenarios.
Currently is hard to understand how it works in real world or how it would work with other user/automated actions.
Please consider using few scenarios. sample list of branches and describing step by step how it would work.

Reconsider PR checks

Hello,

Using the action I’ve faced a situation when some PRs are not processed even if all required conditions are met.
After analysing the code I found this check:

pr.reviewRequests.totalCount === 0 &&



In my case, I'm requesting 6 reviews, however, according to the branch protection rules only 1 approval is required. So, pr.reviewRequests.totalCount can be greater than condition.requiredApprovals and will never be equal to 0 .

Here is my action.yaml:


name: Auto Update/Merge branch

on:
  push:
    branches: [release]
  workflow_dispatch:

jobs:
  Update-merge-branch:
    runs-on: [ self-hosted ]
    steps:
      - uses: lcdsmao/[email protected]
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          autoMergeMethod: SQUASH
          protectedBranchNamePattern: release



Could you please consider this issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.