Skip to content

Update github-trigger-event-options.adoc #9345

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

BeFunes
Copy link
Contributor

@BeFunes BeFunes commented Apr 15, 2025

Description

A brief description of the changes.

Reasons

A link to a GitHub and/or JIRA issue (if applicable).
Otherwise, a brief sentence about why you made these changes.

Content Checklist

Please follow our style when contributing to CircleCI docs. Our style guide is here: https://circleci.com/docs/style/style-guide-overview.

Please take a moment to check through the following items when submitting your PR (this is just a guide so will not be relevant for all PRs) 😸:

  • Break up walls of text by adding paragraph breaks.
  • Consider if the content could benefit from more structure, such as lists or tables, to make it easier to consume.
  • Keep the title between 20 and 70 characters.
  • Consider whether the content would benefit from more subsections (h2-h6 headings) to make it easier to consume.
  • Check all headings h1-h6 are in sentence case (only first letter is capitalized).
  • Is there a "Next steps" section at the end of the page giving the reader a clear path to what to read next?
  • Include relevant backlinks to other CircleCI docs/pages.

@BeFunes BeFunes marked this pull request as ready for review April 15, 2025 11:41
@BeFunes BeFunes requested review from a team as code owners April 15, 2025 11:41
@@ -96,6 +96,13 @@ a| * `opened`

|===

All pipelines triggered by link:https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request[pull request events] also have the following xref:variables/#pipeline-values[pipeline values] are also populated:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All pipelines triggered by link:https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request[pull request events] also have the following xref:variables/#pipeline-values[pipeline values] populated:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively:

For all pipelines triggered by link:[https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_requestpull request events] the following xref:variables/#pipeline-values[pipeline values] are also populated:

* `pipeline.event.github.pull_request.draft`: a boolean value indicating whether the pull request is a draft
* `pipeline.event.github.pull_request.title`: the title of the pull request
* `pipeline.event.github.pull_request.number`: the numeric identifier of the pull request
These values are extracted directly from the GitHub event payload. The part after prefix `pipeline.event.github.*` matches the corresponding field in the pull request event structure described in link:https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request[this page].

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bullet list is not properly formatted:
Screenshot 2025-04-15 at 22 40 22

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There needs to be an empty line between the sentence "All pipelines triggered by pull request events also have the following pipeline values populated:" and the first item of the list.

And also a full stop at the end of each item.

All pipelines triggered by link:https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request[pull request events] also have the following xref:variables/#pipeline-values[pipeline values] are also populated:

* `pipeline.event.github.pull_request.base.ref`: the name of the *base* (or target) branch of the PR - that is the branch that will receive the changes.
* `pipeline.event.github.pull_request.head.ref`: the name of the *head* branch of the PR - that is the branch containing the changes to be merged.
* `pipeline.event.github.pull_request.draft`: a boolean value indicating whether the pull request is a draft.
* `pipeline.event.github.pull_request.title`: the title of the pull request.
* `pipeline.event.github.pull_request.number`: the numeric identifier of the pull request.

These values are extracted directly from the GitHub event payload. The part after prefix `pipeline.event.github.*` matches the corresponding field in the pull request event structure described in link:https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request[this page].
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants