cloudflare / pages-action

MIT License
468 stars 95 forks source link

[Request] Nicer CF deployment descriptions #48

Closed IanVS closed 1 month ago

IanVS commented 1 year ago

Currently, the description of the builds in Cloudflare are of the form:

Merge 4a618058856d794a1240bfc87c4ddf8294a15f36 into 436b31bdb8e6c124dc51133e6ba2d268e62aecda

It would be great if the PR's last commit summary could be used instead.

IanVS commented 1 year ago

~Turns out this is happening just because I'm in a strange situation treating my PR's target branch as the main branch in Cloudflare until I get everything working. It will hopefully be resolved once I adjust a few things, will report back.~

IanVS commented 1 year ago

I'm still getting ugly titles. I also notice that it thinks the branch is "head" when I push to a direct-upload project that isn't connected to git.

limakzi commented 1 year ago

@IanVS I agree. I would allow the end user to provide environment description. At the very same time, I am getting awful environment descriptions for deployments, as attached in screenshot below. Awful, is of course, personal opinion. I would prefer have a parameter to set: pr-#id [preview].

image

nprogers commented 1 month ago

@IanVS @limakzi Is this an issue with wrangler-action? We're porting pages-action there and stepping up the maintenance. I'm pretty new to GitHub actions/deployments/environments, so I'd be better able to assist if you could provide a more specific request, meaning a specific input or output for the action and what it should do.

IanVS commented 1 month ago

Yes, it's still a problem even after moving over to wrangler-action.

This is what I see in my Cloudflare pages deployments dashboard:

image

I am using the action like this:

      # Deploy preview
      - name: Deploy to Cloudflare
        uses: cloudflare/wrangler-action@v3
        with:
          apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          accountId: <redacted>
          workingDirectory: .definednet
          command: pages deploy build --project-name=webclient-alpha --branch=${{ steps.branch-name.outputs.current_branch }}

Instead of Merge <commit1> into <commit2>, I'd like it to show the commit message summary (first line) of commit1.

nprogers commented 1 month ago

Ok I see. Have you tried passing through the commit message with -- commit message option in the wrangler command?

IanVS commented 1 month ago

I haven't. Is it not possible for wrangler itself to choose a more useful default message?

nprogers commented 1 month ago

It looks like wrangler does attempt to create a useful message based on your last commit. You should file a feature request with that team if you feel it should do something different. This isn't something we can do inside an action.