Skip to content
Discussion options

You must be logged in to vote

@MatBenfield,

When the workflow is triggered by the events related to issue (issues or issue_comment), from the github context of the workflow run you can get the details of the issue via the object “github.event.issue”.
For example:

  • github.event.issue.title - - the title of the issue.
  • github.event.issue.body - - the body (or description) of the issue, it is the first comment when creating the issue.

A simple workflow example:

on: issues

jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: View issue information
run: |
echo "Issue title: ${{ github.event.issue.title }}"
echo "Issue body: ${{ github.event.issue.body }}"

You also can print the whole github context to the logs to view more …

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@thechelsuk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product Feedback Share your thoughts and suggestions on GitHub features and improvements
3 participants