-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat: test github action bot #14491
feat: test github action bot #14491
Conversation
✅ Deploy Preview for carbon-components-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-components-react ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty solid! Just a couple minor thoughts, these apply to both workflows
add-comment: | ||
## TODO: figure out how to escape colons for labels | ||
# if: github.event.label.name == "proposal: accepted" && github.event.label.name == "community contribution" | ||
if: "${{ contains(github.event.label, 'proposal: accepted') && contains(github.event.label, 'communit contribution') }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went down a big rabbit hole last month with finding valid yaml syntax that allows colons. What I discovered was we need to use format()
on the label name. Like this:
contains(github.event.labels.*.name, format('proposal{0} accepted', ':'))
This replaces the first parameter's {0}
with the value of the second parameter :
Here's how it looks in what I delivered:
carbon/.github/workflows/add-to-merge-queue.yml
Lines 21 to 25 in f838aaa
if: | |
${{ contains(github.event.pull_request.labels.*.name, | |
format('status{0} ready to merge 🎉', ':')) || | |
contains(github.event.pull_request.labels.*.name, format('status{0} | |
enable automerge 🟠', ':'))}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was down that same rabbit hole this morning while working on this with Andrea. Is this a better way than the escape syntax below? It was not throwing any errors in the ide.
"${{ contains(github.event.label, 'proposal: accepted') && contains(github.event.label, 'community contribution') }}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@garrikats Yeah I tried it in this commit: 66004ba, and it still didn't work 😕
Using format()
was the only thing I found that worked. It's a shame because I think it's terrible for readability.
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
Part of #14294
This is to test the github bot - this is just the second of a series of tests
Worked on this with @garrigoose 🎉
MERGING for testing purposes