# Is it possible to have have a trigger for GitHub "release" events?

**URL:** <https://drone.discourse.group/t/is-it-possible-to-have-have-a-trigger-for-github-release-events/11227>\
**Category:** Drone Support\
**Created:** [December 6, 2020, 11:58am UTC](https://drone.discourse.group/t/is-it-possible-to-have-have-a-trigger-for-github-release-events/11227 "2020-12-06T11:58:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Craig\_G](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/craig_g/32/3035_2.png) [@Craig\_G](https://drone.discourse.group/u/Craig_G)\
**Post date:** [December 6, 2020, 11:58am UTC](https://drone.discourse.group/t/is-it-possible-to-have-have-a-trigger-for-github-release-events/11227/1 "2020-12-06T11:58:37Z")

</div>

Is it possible to have have a trigger for GitHub “release” events ?

I appreciate that these are essentially “tags” however the release event has additional data in the webhook, specifically I am interested in this part of the JSON:

```
{
  "action": "created",
  "release": {
     ...release data...
   },
    "prerelease": true, <-------------- This variable
    "created_at": "2020-12-05T15:16:47Z",
    "published_at": "2020-12-06T11:48:43Z",

```

I can see from the documentation that under event triggers there is a type called “custom” though I couldn’t find any documentation on how to use this. Additionally is there anyway of accessing the webhook JSON as it doesn’t appear like any of the automatic drone variables would capture this?

Any help would be greatly appreciated

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [December 7, 2020, 3:19pm UTC](https://drone.discourse.group/t/is-it-possible-to-have-have-a-trigger-for-github-release-events/11227/2 "2020-12-07T15:19:04Z")

</div>

> [@Show in web ui when a build fails due to timeout](https://drone.discourse.group/t/show-in-web-ui-when-a-build-fails-due-to-timeout/8465/1):
>
> Is it possible to have have a trigger for GitHub “release” events ?

Drone does not currently support `release` events. Drone supports `push` events (which includes pushing branches and tags) and `pull_request` events (open and sync actions).

---

<div class="post-metadata">

**Author:** ![Craig\_G](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/craig_g/32/3035_2.png) [@Craig\_G](https://drone.discourse.group/u/Craig_G)\
**Post date:** [December 7, 2020, 3:24pm UTC](https://drone.discourse.group/t/is-it-possible-to-have-have-a-trigger-for-github-release-events/11227/3 "2020-12-07T15:24:43Z")

</div>

Hi @bradrydzewski,

Thanks for the reply. To the second part of the question, is it possible at all to access the JSON data provided in the Webhook. I think I can meet my use case by using tag events but need to access data in the webhook that isn’t surfaced via the automatic DRONE variables.

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [December 7, 2020, 3:26pm UTC](https://drone.discourse.group/t/is-it-possible-to-have-have-a-trigger-for-github-release-events/11227/4 "2020-12-07T15:26:27Z")

</div>

We do not store the original JSON payloads in Drone. We extract a subset of variables from the payload and we make those variables available to your pipeline as environment variables. You can find a list of variables at [https://docs.drone.io/pipeline/environment/reference/](https://docs.drone.io/pipeline/environment/reference/)

---

<div class="post-metadata">

**Author:** ![Craig\_G](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/craig_g/32/3035_2.png) [@Craig\_G](https://drone.discourse.group/u/Craig_G)\
**Post date:** [December 7, 2020, 3:30pm UTC](https://drone.discourse.group/t/is-it-possible-to-have-have-a-trigger-for-github-release-events/11227/5 "2020-12-07T15:30:57Z")

</div>

Hi @bradrydzewski,

Thanks for clarifying this, is it plausible for us to create an extension / plugin that could extract the additional variables from the webhook and include them? If so do you have a suggestion for where we could start with this ?

---

<div class="post-metadata">

**Author:** ![bradrydzewski](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/bradrydzewski/32/3513_2.png) [@bradrydzewski](https://drone.discourse.group/u/bradrydzewski)\
**Post date:** [December 7, 2020, 4:04pm UTC](https://drone.discourse.group/t/is-it-possible-to-have-have-a-trigger-for-github-release-events/11227/6 "2020-12-07T16:04:06Z")

</div>

Environment extensions can be used to inject additional environment variables into Drone pipelines. You could, for example, create an extension that makes an API call to GitHub to fetch and then inject additional data into your pipeline as environment variables. There is no option, however, to access the raw webhook and extract and store additional data.

> **[Environment Extension | Drone](https://docs.drone.io/extensions/environment/)**
