Skip to content

PR title empty commit step #168

Description

@chris3ware

I would like to push an empty commit when pr title validation failures are corrected because this will trigger enforce-all-checks to run on a new head.sha as discussed here: poseidon/wait-for-status-checks#383 (comment). The edited type does not produce a new commit.

The step to push the empty commit is not running because access to the required contexts is not available with the pull_request event; pull_request_target should be used. (According to copilot). I have verified that the context output is empty with the following:

- name: dump pull request event details
  run: |
    echo "PR action: ${{ github.event.pull_request.action }}"
    echo "PR changes: ${{ toJSON(github.event.pull_request.changes) }}"

# Trigger checks with empty commit when PR title is edited to resolve validation failure
  - name: Trigger checks with empty commit
  if: ${{ github.event.pull_request.action == 'edited' && github.event.pull_request.changes.title.from != null }}
    run: |
      echo "Title changed from: ${{ github.event.pull_request.changes.title.from }}"

Produces:

Run echo "PR action: "
  echo "PR action: "
  echo "PR changes: null"

I either need to change it to run on pull_request_target or think of another way to trigger

Originally posted by @chris3ware in #167 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions