Skip to content

Cannot read property 'contexts' of null #236

@lurbanski-equinix

Description

@lurbanski-equinix

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/update-branch@v3.1.3
        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/update-branch@v3.1.3'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run lcdsmao/update-branch@v3.1.3
##[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/update-branch@v3.1.3
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions