screwdriver icon indicating copy to clipboard operation
screwdriver copied to clipboard

Expose more information gathered from github webook to users

Open adong opened this issue 2 years ago • 7 comments

What happened: Git webhook sent information to SD SD exposes certain information to SD Users, such as committer, author, and etc,.

And now, users want to see if more information can be exposed as environment variables, such as DRAFT_PR

What you expected to happen: We should think about what can be exposed and expand the number of exposed info to environment variables.

How to reproduce it: n/a

adong avatar Sep 20 '22 17:09 adong

I've been thinking about a number of small features that require data from the Github API (is this a draft pr?, is this from a person or an org? is this from a fork?)... Turns out that all of that info is available in the webhook payload that is sent to SD.

Could you expose the raw json from the webhook that is sent to SD to trigger a build...maybe in an environment variable? That would let builds extract any info they want without having to build these as one-off features.

dbgrandi avatar Sep 20 '22 20:09 dbgrandi

@dbgrandi That's a good idea, some other interesting data that would allow for more rich checks and notifications would be:

  • PR labels that are applied
  • isDefaultBranch
  • authorUserName (for @mentioning)
  • Code owner list

Not sure if that webhook payload returns all of that, but if it does, that would be great.

master-nevi avatar Sep 21 '22 16:09 master-nevi

Pretty sure that all except for CODEOWNERS info would be returned in the webhook payload.

dbgrandi avatar Sep 21 '22 16:09 dbgrandi

We have few options on where to store this extra info. Either as part of default metadata - see the commit.entries. Or as environment variables

@tkyi @sagar1312 thoughts ^^ ?

jithine avatar Sep 26 '22 22:09 jithine

I think putting this info in metadata makes more sense, since environment variables seems to be more focused on information that SD sets/uses for builds.

tkyi avatar Oct 12 '22 17:10 tkyi

Hi @jithine @tkyi I just wanted to check in and see if this request has gotten any traction. Thanks!

master-nevi avatar Dec 01 '22 00:12 master-nevi

Hi @jithine @tkyi just checking in again to see if there's any movement on this, metadata or env var, doesn't matter to me. I'll take anything at this point.

cc @dbgrandi

master-nevi avatar Jul 26 '23 19:07 master-nevi