Skip to content
\n

This isn't terrible:

\n
-        fetch-depth: ${{ !contains(inputs.check_commit_messages, 'commits') && '1' || '0' }}\n-        filter: ${{ contains(inputs.check_commit_messages, 'commits') && 'tree:0' || '' }}\n+        fetch-depth: ${{ case(contains(inputs.check_commit_messages, 'commits'), '0', '1') }}\n+        filter: ${{ case(contains(inputs.check_commit_messages, 'commits'), 'tree:0', '') }}
\n

These all smell:

\n
-          ${{ inputs.report_title_suffix && format('{0}-{1}', 'check-spelling-comment', inputs.report_title_suffix) || 'check-spelling-comment' }}\n+          ${{ case(inputs.report_title_suffix != '', format('{0}-{1}', 'check-spelling-comment', inputs.report_title_suffix), 'check-spelling-comment') }}
\n
-        name: ${{ inputs.report_title_suffix && format('{0}-{1}', 'check-spelling-sarif', inputs.report_title_suffix) || 'check-spelling-sarif' }}\n+        name: ${{ case(inputs.report_title_suffix != '', format('{0}-{1}', 'check-spelling-sarif', inputs.report_title_suffix), 'check-spelling-sarif') }}
\n

This should smell (but doesn't because the original code had an at the time superfluous != ''):

\n
-        wait-for-processing: ${{ inputs.wait-for-sarif-processing != '' && inputs.wait-for-sarif-processing || 'false' }}\n+        wait-for-processing: ${{ case(inputs.wait-for-sarif-processing != '', inputs.wait-for-sarif-processing, 'false') }}
\n

smells:

\n
-        category: ${{ inputs.report_title_suffix && format('{0}-{1}', 'check-spelling', inputs.report_title_suffix) || 'check-spelling' }}\n+        category: ${{ case(inputs.report_title_suffix != '', format('{0}-{1}', 'check-spelling', inputs.report_title_suffix), 'check-spelling') }}
\n

This is worse than what it started with:

\n
-        trace: ${{ (inputs.debug || github.run_attempt > 1) && '1' || '' }}\n+        trace: ${{ case((inputs.debug || github.run_attempt > 1) && true, '1', '') }}
\n

smelly:

\n
-    default: ${{ matrix && toJson(matrix) || '' }}\n+    default: ${{ case(!!matrix, toJson(matrix), '') }}
\n

The failure mode for this is also absolutely lousy. I had random workflows die and it's taken a bunch of iterations to hopefully catch all of the cases where I was relying on coercion that used to work and now doesn't.

","upvoteCount":2,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

💬 Your Product Feedback Has Been Submitted 🎉

\n

Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users.

\n

Here's what you can expect moving forward ⏩

\n
    \n
  • Your input will be carefully reviewed and cataloged by members of our product teams. \n
      \n
    • Due to the high volume of submissions, we may not always be able to provide individual responses.
    • \n
    • Rest assured, your feedback will help chart our course for product improvements.
    • \n
    \n
  • \n
  • Other users may engage with your post, sharing their own perspectives or experiences. 
  • \n
  • GitHub staff may reach out for further clarification or insight. \n
      \n
    • We may 'Answer' your discussion if there is a current solution, workaround, or roadmap/changelog post related to the feedback.
    • \n
    \n
  • \n
\n

Where to look to see what's shipping 👀

\n
    \n
  • Read the Changelog for real-time updates on the latest GitHub features, enhancements, and calls for feedback.
  • \n
  • Explore our Product Roadmap, which details upcoming major releases and initiatives.
  • \n
\n

What you can do in the meantime 💻

\n
    \n
  • Upvote and comment on other user feedback Discussions that resonate with you.
  • \n
  • Add more information at any point! Useful details include: use cases, relevant labels, desired outcomes, and any accompanying screenshots.
  • \n
\n

As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities.

\n

Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐

","upvoteCount":0,"url":"https://github.com/orgs/community/discussions/185992#discussioncomment-15655090"}}}
Discussion options

You must be logged in to vote

💬 Your Product Feedback Has Been Submitted 🎉

Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users.

Here's what you can expect moving forward ⏩

  • Your input will be carefully reviewed and cataloged by members of our product teams. 
    • Due to the high volume of submissions, we may not always be able to provide individual responses.
    • Rest assured, your feedback will help chart our course for product improvements.
  • Other users may engage with your post, sharing their own perspectives or experiences. 
  • GitHub staff may reach out for further clarification or insight. 
    • We may 'Answer' your discussion if th…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jsoref
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD General General topics and discussions that don't fit into other categories, but are related to GitHub Product Feedback Share your thoughts and suggestions on GitHub features and improvements Actions Runner For issues and discussions related to the Actions Runner project
1 participant