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

[Bug] Action fails on pull request close #12

Open
ThatOtherAndrew opened this issue Jan 4, 2023 · 0 comments
Open

[Bug] Action fails on pull request close #12

ThatOtherAndrew opened this issue Jan 4, 2023 · 0 comments

Comments

@ThatOtherAndrew
Copy link

Issue

If a pull request is closed without merging, the action fails with an error at the Parse content metadata step.

Example

jq: error (at organization-Breadcord-issue-PR_kwDOItt-hs5Gk46V.json:0): Cannot iterate over null (null)

Full debug log from running this job in a repository: debug.log

The relevant code from the workflow file:

on:
  issues:
    types: [ closed ]
  pull_request:
    types: [ closed ]

  if_closed:
    name: Mark as Closed
    if: ${{ github.event.issue.state_reason == 'not_planned' || (github.event_name == 'pull_request' && !github.event.pull_request.merged) }}
    runs-on: ubuntu-latest
    steps:
      - uses: Breadcord/update-project-action@main
        with:
          github_token: ${{ secrets.ACTIONS_TOKEN }}
          organization: Breadcord
          project_number: 1
          content_id: ${{ github.event.issue.node_id || github.event.pull_request.node_id }}
          field: Status
          value: Closed

Note that Breadcord/update-project-action is a clone of this action, but with PRs #8 and #10 merged in.

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

1 participant