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

Enforce labels without third-party Action #38

Merged
merged 2 commits into from
Aug 25, 2023
Merged

Enforce labels without third-party Action #38

merged 2 commits into from
Aug 25, 2023

Conversation

withinfocus
Copy link
Contributor

🎟️ Tracking

Internal change.

🚧 Type of change

  • 🤖 Build/deploy pipeline (DevOps)

📔 Objective

Uses a simple condition to enforce labels, as a check failure.

📋 Code changes

  • .github/workflows/enforce-labels.yml: Action modification to check labels.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@bitwarden-bot
Copy link

bitwarden-bot commented Aug 23, 2023

Logo
Checkmarx One – Scan Summary & Detailsb578d8eb-48b3-4125-b923-8c803c2c682f

No New Or Fixed Issues Found

@withinfocus withinfocus marked this pull request as ready for review August 23, 2023 16:43
@withinfocus withinfocus requested a review from a team as a code owner August 23, 2023 16:43
@withinfocus withinfocus requested a review from a team August 23, 2023 16:45
@mimartin12 mimartin12 added hold and removed hold labels Aug 23, 2023
@mimartin12 mimartin12 added hold and removed hold labels Aug 23, 2023
Co-authored-by: MtnBurrit0 <[email protected]>
jobs:
enforce-label:
if: ${{ contains(github.event.*.labels.*.name, 'hold') || contains(github.event.*.labels.*.name, 'needs-qa') }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 Wondering if we could use an array here.

https://docs.github.com/en/actions/learn-github-actions/expressions#example-matching-an-array-of-strings

contains(fromJSON('["needs-qa", "hold"]'), github.event.*.labels.*.name)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the converse. The first parameter is what's being searched. I wish that existed too.

Copy link
Member

@vvolkgang vvolkgang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏾

@withinfocus withinfocus merged commit 6e38e71 into main Aug 25, 2023
3 of 4 checks passed
@withinfocus withinfocus deleted the newlabeler branch August 25, 2023 13:39
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

Successfully merging this pull request may close these issues.

4 participants