-
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
Merged
andreancardona
merged 4 commits into
carbon-design-system:main
from
andreancardona:14294-triage-github-bot
Aug 25, 2023
Merged
feat: test github action bot #14491
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning | ||
name: Add comment on Enhancement Label | ||
on: | ||
issues: | ||
types: | ||
- labeled | ||
jobs: | ||
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') }}" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Add comment | ||
uses: peter-evans/create-or-update-comment@5f728c3dae25f329afbe34ee4d08eef25569d79f | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
The Carbon team has accepted this proposal! Our team doesn’t have the cycles to work on this now, so we are requesting community contributors. Please see the labels for roles that are needed. If you are willing to help out, comment below and we will get in touch! | ||
andreancardona marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning | ||
name: Add comment on Enhancement Label | ||
on: | ||
issues: | ||
types: | ||
- labeled | ||
jobs: | ||
add-comment: | ||
if: github.event.label.name == 'enhancement' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Add comment | ||
uses: peter-evans/create-or-update-comment@5f728c3dae25f329afbe34ee4d08eef25569d79f | ||
with: | ||
issue-number: ${{ github.event.issue.number }} | ||
body: | | ||
Thank you for submitting a feature request. Here's what to expect next. | ||
Your proposal is open and is now being [triaged](https://github.com/orgs/carbon-design-system/projects/51/views/1) by the Carbon team. | ||
If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request volunteers from the community. | ||
Read the full triaging workflow [here](https://github.com/carbon-design-system/carbon/blob/main/docs/guides/support.md#type-enhancement-). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: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
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.