Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'get') #492

Unanswered
Swiggy-Asmi asked this question in Q&A
Discussion options

Run actions/github-script@v6.1.0
TypeError: Cannot read properties of undefined (reading 'get')
Error: Unhandled error: TypeError: Cannot read properties of undefined (reading 'get')
at eval (eval at callAsyncFunction (/Users/runner/work/_actions/actions/github-script/v6.1.0/dist/index.js:4807:16), :5:50)
at callAsyncFunction (/Users/runner/work/_actions/actions/github-script/v6.1.0/dist/index.js:4808:12)
at main (/Users/runner/work/_actions/actions/github-script/v6.1.0/dist/index.js:4862:26)
at 272 (/Users/runner/work/_actions/actions/github-script/v6.1.0/dist/index.js:4846:1)
at webpack_require (/Users/runner/work/_actions/actions/github-script/v6.1.0/dist/index.js:24:31)
at startup (/Users/runner/work/_actions/actions/github-script/v6.1.0/dist/index.js:43:19)
at /Users/runner/work/_actions/actions/github-script/v6.1.0/dist/index.js:49:18
at Object. (/Users/runner/work/_actions/actions/github-script/v6.1.0/dist/index.js:52:10)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)

 - name: Log Review Event
 run: echo "A review was submitted to the pull request."
 - name: Check PR milestone
 id: check-milestone
 uses: actions/github-script@v6.1.0
 with:
 script: |
 const { owner, repo } = context.repo;
 const pull_number = context.payload.pull_request.number;
 const { data: pullRequest } = await github.pulls.get({
 owner,
 repo,
 pull_number 
 });
 const requiredMilestone = 'v-532'; // Replace with the current milestone name
 if (!pullRequest.milestone || pullRequest.milestone.title !== requiredMilestone) {
 core.setOutput('run', 'false');
 } else {
 core.setOutput('run', 'true');
 - name: Move PR to '1 approval done' column
 if: steps.check-milestone.outputs.run == 'true'
 run: python .github/scripts/move_to_one_approval.py
 env:
 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 PR_NUMBER: ${{ github.event.pull_request.number }}
 REPO: ${{ github.repository }}
You must be logged in to vote

Replies: 1 comment

Comment options

This worked before for me, but started happening when I changed the default branch. Is there any way to fix it?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /