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

ci: add option to generate one workflow #2822

Merged
merged 4 commits into from
Nov 10, 2022
Merged

ci: add option to generate one workflow #2822

merged 4 commits into from
Nov 10, 2022

Conversation

kweinmeister
Copy link
Collaborator

The workflow generation script currently creates all workflows, every time it is run.

This minor change enables an extra optional parameter with the workflow title, e.g. cloud-tasks.

A workflow will only be generated if it matches that parameter. If the parameter is not specified, the behavior remains the same, generating all workflows.

@kweinmeister kweinmeister requested review from a team as code owners November 10, 2022 14:08
@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Nov 10, 2022
@NimJay
Copy link
Contributor

NimJay commented Nov 10, 2022

This is a good idea. Thanks for adding this, Karl!

I've tested:

  1. node .github/workflows/generate.js
  2. node .github/workflows/generate.js some-invalid-path
  3. node .github/workflows/generate.js container-analysis/snippets (where container-analysis/snippets was a valid folder from migrate code from googleapis/nodejs-containeranalysis #2816)

All 3 scenarios worked as expected. 👍

Copy link
Contributor

@NimJay NimJay left a comment

Choose a reason for hiding this comment

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

My suggestion (variable rename) is a nitpick. Feel free to ignore.
Approved!

kweinmeister and others added 2 commits November 10, 2022 09:41
Co-authored-by: Nim Jayawardena <i.am.nim.jay@gmail.com>
Co-authored-by: Nim Jayawardena <i.am.nim.jay@gmail.com>
@kweinmeister
Copy link
Collaborator Author

Thanks for the review, @NimJay ! Accepted your changes.

@kweinmeister
Copy link
Collaborator Author

Also, this reminded me to update CONTRIBUTING.md to document this parameter.

@NimJay
Copy link
Contributor

NimJay commented Nov 10, 2022

It looks like the CLA check is failing because of my email address.
This is strange because my email address passes the CLA check for other contributions I make.
I will dig deeper into this issue.
In the meantime, feel free to remove me as a co-author from the commits (e.g., by running git rebase -i HEAD^^^ and replacing pick with reword for the commits with my name).

Update: I have overridden the CLA check. ✅

@ace-n ace-n merged commit 89e21b6 into main Nov 10, 2022
@ace-n ace-n deleted the generate-filter branch November 10, 2022 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
samples Issues that are directly related to samples.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants