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

TypeError: GitHub is not a constructor #7

Open
ericyd opened this issue Feb 16, 2023 · 1 comment
Open

TypeError: GitHub is not a constructor #7

ericyd opened this issue Feb 16, 2023 · 1 comment

Comments

@ericyd
Copy link

ericyd commented Feb 16, 2023

The relevant part of our GH Actions config:

jobs:
  create-release-branch:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout'
        uses: actions/checkout@v3
        with:
          ref: 'main'
          fetch-depth: 0
      - name: 'Get latest release'
        id: latest_release
        uses: jossef/action-latest-release-info@v1.2.2
        env:
          GITHUB_TOKEN: ${{ github.token }}

Here's some debug info from GH Actions

Current runner version: '2.301.1'
Operating System
  Ubuntu
  22.04.1
  LTS
Runner Image
  Image: ubuntu-22.04
  Version: 20230206.1
  Included Software: https://github.com/actions/runner-images/blob/ubuntu22/20230206.1/images/linux/Ubuntu2204-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/ubuntu22%2F20230206.1
Runner Image Provisioner
  2.0.117.1

and here's the error from the log

Run jossef/action-latest-release-info@v1.2.2
  env:
    GITHUB_TOKEN: ***
TypeError: GitHub is not a constructor
    at run (/home/runner/work/_actions/jossef/action-latest-release-info/v1.2.2/dist/index.js:168:24)
    at Object.31 (/home/runner/work/_actions/jossef/action-latest-release-info/v1.2.2/dist/index.js:200:5)
    at __webpack_require__ (/home/runner/work/_actions/jossef/action-latest-release-info/v1.2.2/dist/index.js:24:31)
    at startup (/home/runner/work/_actions/jossef/action-latest-release-info/v1.2.2/dist/index.js:43:19)
    at /home/runner/work/_actions/jossef/action-latest-release-info/v1.2.2/dist/index.js:47:18
    at Object.<anonymous> (/home/runner/work/_actions/jossef/action-latest-release-info/v1.2.2/dist/index.js:50:10)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
@pepoviola
Copy link

Hi @ericyd, I just forked and fix it here https://github.com/pepoviola/action-latest-release-info. Also, I open this pr to incorporate the fix upstream #10

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants