Skip to content
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

Surfacing author / username information to Slack notifier (GH) #158

Closed
wyardley opened this issue Feb 22, 2023 · 2 comments
Closed

Surfacing author / username information to Slack notifier (GH) #158

wyardley opened this issue Feb 22, 2023 · 2 comments

Comments

@wyardley
Copy link

Is there any way to surface author information? I see some references to _COMMIT_AUTHOR_EMAIL, but, by default, neither that or anything like it is surfaced in the payload I see when using GitHub triggers:

"_COMMIT_AUTHOR_EMAIL": "$(build.substitutions._COMMIT_AUTHOR_EMAIL)",

Is there a way to get the author email and / or GitHub email into something I can use downstream in the notifier?

@wyardley
Copy link
Author

btw, confirmed on the GCP community Slack with a member of the Cloud Build team that this doesn't seem to be a thing.

@wyardley
Copy link
Author

Turns out it is possible, but you have to add it as a substitution
For example, if you add _COMMIT_AUTHOR with a value of $(commit.author.login), it will get populated.

Docs: https://cloud.google.com/build/docs/configuring-builds/use-bash-and-bindings-in-substitutions

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

No branches or pull requests

1 participant