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

Appearance settings

Handle PullRequest/Action casing in event payloads to detect merged PRs #260

Copy link
Copy link
@MariusStorhaug

Description

Summary

The Get-PSModuleSettings action treats merged PRs as abandoned when the event payload uses PullRequest/Action (PascalCase) keys instead of pull_request/action.

Context

The GoogleFonts workflow emits event data with PullRequest and Action properties. When a PR is closed and merged, the evaluated settings show:

  • GITHUB_EVENT_NAME: pull_request
  • GITHUB_EVENT_ACTION: closed
  • GITHUB_EVENT_PULL_REQUEST_MERGED: False
  • isAbandonedPR: True
  • isMergedPR: False

This causes Publish-Module to run immediately as if the PR was abandoned.

Expected

Merged PRs should be detected correctly even when the event payload uses PullRequest and Action casing.

Actual

Merged PRs are treated as abandoned.

Repro

  1. Trigger the workflow on a merged PR with event payload keys PullRequest/Action (example payload from GoogleFonts workflow).
  2. Observe the calculated values in Get-PSModuleSettings.

Proposed fix

Check both action and Action, and both pull_request and PullRequest when determining PR action and merged status.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.