Title: How to make conditional check on a label name that includes emoji · Issue #441 · actions/github-script · GitHub
Open Graph Title: How to make conditional check on a label name that includes emoji · Issue #441 · actions/github-script
X Title: How to make conditional check on a label name that includes emoji · Issue #441 · actions/github-script
Description: On the Microsoft ASP.NET Core documentation repo, we use a label with a watch emoji (:watch:, ⌚) in our not-triaged label. The label is ... ⌚ Not Triaged When we try to make a conditional check for the watch emoji in a workflow that remo...
Open Graph Description: On the Microsoft ASP.NET Core documentation repo, we use a label with a watch emoji (:watch:, ⌚) in our not-triaged label. The label is ... ⌚ Not Triaged When we try to make a conditional check for...
X Description: On the Microsoft ASP.NET Core documentation repo, we use a label with a watch emoji (:watch:, ⌚) in our not-triaged label. The label is ... ⌚ Not Triaged When we try to make a conditional check for...
Opengraph URL: https://github.com/actions/github-script/issues/441
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"How to make conditional check on a label name that includes emoji","articleBody":"On the Microsoft ASP.NET Core documentation repo, we use a label with a watch emoji (`:watch:`, ⌚) in our not-triaged label.\r\n\r\nThe label is ...\r\n\r\n⌚ Not Triaged\r\n\r\nWhen we try to make a conditional check for the watch emoji in a workflow that removes this label under some conditions based on the presence of other labels, either the emoji in the check fails to match or throws a syntax error.\r\n\r\nHere are the two cases that we've tried ...\r\n\r\n### Using colon syntax\r\n\r\n```yml\r\nif: github.event.label.name == ':watch: Not Triaged' \u0026\u0026 (github.event.label.name == 'aspnetcore-blazorhybrid/tech' || github.event.label.name == 'aspnetcore-blazor/tech')\r\n```\r\n\r\nResult: The line throws a syntax error in the GH code editor ...\r\n\r\n\u003e incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line\r\n\r\nThe workflow error when this is executed is ...\r\n\r\n\u003e Invalid workflow file\r\n\u003e\r\n\u003e You have an error in your yaml syntax on line 104\r\n\r\nI tried escaping the colons with backslashes, and I also tried using the `${{ ... }}` syntax around the conditional expression. Neither approach works.\r\n\r\n### Using the graphic emoji\r\n\r\n```yml\r\nif: github.event.label.name == '⌚ Not Triaged' \u0026\u0026 (github.event.label.name == 'aspnetcore-blazorhybrid/tech' || github.event.label.name == 'aspnetcore-blazor/tech')\r\n```\r\n\r\nResult: Doesn't throw a syntax error, nor does it cause the workflow to log an error when it runs. ***However***, it fails to match on the label name, so the workflow job fails to execute our script.\r\n\r\n### How can we address this?\r\n\r\nIs there an approach to deal with this? Is this a bug in your processing that you'd like to fix? If it is a bug that will be fixed, is there a workaround approach that I can use in the meantime?\r\n\r\nIf this isn't a bug, documentation for `if:` syntax probably should explain how to address it at ...\r\n\r\nhttps://docs.github.com/en/actions/using-jobs/using-conditions-to-control-job-execution\r\n\r\nCross-reference to our entire workflow script: https://github.com/dotnet/AspNetCore.Docs/blob/main/.github/workflows/issue-processing.yml\r\n\r\n☝️ See ***Line 104*** of the workflow, which doesn't throw a syntax error but doesn't work.\r\n\r\n","author":{"url":"https://github.com/guardrex","@type":"Person","name":"guardrex"},"datePublished":"2023-11-21T13:32:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/441/github-script/issues/441"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:60db62c7-4c66-5d2d-9681-d4051cee048e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8D7E:1F16:684AA67:944B980:6A50F83C |
| html-safe-nonce | b2c7f9d5ab05e802ae26a38f4fdc791c99b1f27e555d10472255c68d088b6dfa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDdFOjFGMTY6Njg0QUE2Nzo5NDRCOTgwOjZBNTBGODNDIiwidmlzaXRvcl9pZCI6IjIyNDQzNDUxNjUyODczMjM3MDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5e75afc13583bd57385d9a0c2caf5d6cc2122d18be0a9227d262736a660f276b |
| hovercard-subject-tag | issue:2004299906 |
| github-keyboard-shortcuts | repository,issues,actions,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/actions/github-script/441/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4356fad2a1870adeee1949fdf5dd75c17e2d4d73972b312675208983af4f42c9/actions/github-script/issues/441 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4356fad2a1870adeee1949fdf5dd75c17e2d4d73972b312675208983af4f42c9/actions/github-script/issues/441 |
| og:image:alt | On the Microsoft ASP.NET Core documentation repo, we use a label with a watch emoji (:watch:, ⌚) in our not-triaged label. The label is ... ⌚ Not Triaged When we try to make a conditional check for... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | guardrex |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5266e58c17a510c403505cc811606465e90a881d2007ee7df1c4800d5c659838 |
| turbo-cache-control | no-preview |
| go-import | github.com/actions/github-script git https://github.com/actions/github-script.git |
| octolytics-dimension-user_id | 44036562 |
| octolytics-dimension-user_login | actions |
| octolytics-dimension-repository_id | 205262760 |
| octolytics-dimension-repository_nwo | actions/github-script |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 205262760 |
| octolytics-dimension-repository_network_root_nwo | actions/github-script |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8d836581d020676cc0ef4a83cd2fe17e4af02c3d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width