npm / npm/action-deploy

This branch has not been deployed when running on `pull_request`

Open
#41 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
13
Forks
11
PR merge metrics
No merged PRs in 30d

Description

I am running into the deployments not showing up when trying to run on a pull_request

https://github.com/npm/action-deploy/blob/499b502cebf6e93154db89d22e258d36d2fe466a/src/create.ts#L75

The logs are coming up with a ref of refs/pull/1654/merge which I think is the issue.

  "sha": "43fcda52ad5bdc6c559ec6f534bda3af53e53c6c",
  "ref": "refs/pull/1654/merge",
  "payload": "{\"actor\":\"wSedlacek\",\"main_sha\":\"2ff68a6de2b4cb6cfb5c118fd19ee5d654c5924a\"}",
  "transient_environment": true,
  "production_environment": false,
  "performed_via_github_app": null

Screen Shot 2022-12-20 at 02 38 24

From reading the code there doesn't appear to be a way to configure this ref, however I believe I want it to be the github.head_ref || github.ref for them to show up correctly. This is just a hunch though.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/create.ts around line 75 and reproduce the action with a pull_request event. Compare the logged refs, including refs/pull/1654/merge and the proposed head_ref fallback, then verify that deployments for pull requests appear with the intended branch ref.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.