-
I have a GitHub Action setup, which sends a Discord Webhook notification once a commit was performed towards a specific branch, and the GitHub Pages where built using it. I currently use For example, when I made these commits in a PR:
…will the Action use the very first commit, while I want to use the last one. If possible would I now like to switch to displaying the title that was used in the Pull request. My github action can be found here: purrbot-site/Docs/blob/1db3bbf778822ce17baca46a873cc22c1876c1b1/.github/workflows/deploy.yml
This file has been truncated. show original |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
To get the title of the PR, you can use the expression “github.event.pull_request.title” to get it from the github context, when the workflow is running on the events for pull request.
To get the latest commit on the PR, you can do as the steps below:
|
Beta Was this translation helpful? Give feedback.
-
Will this actually work when a Merge is performed? When inside an unmerged PR, this works, but when a PR is merged via Merge commit, this happens:
I’m surprised by how challenging this is. Since my intention is slightly different than the original poster, I will also make a new topic |
Beta Was this translation helpful? Give feedback.
@Andre601,
To get the title of the PR, you can use the expression “github.event.pull_request.title” to get it from the github context, when the workflow is running on the events for pull request.
For example:
To get the latest commit on the PR, you can do as the steps below:
The following is a simple d…