-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Flag-level Action #1337
Flag-level Action #1337
Conversation
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.
Excellent work. Thanks for completeness. Just add the new interface and then you should be all set
decd71d
to
ad8c121
Compare
@dearchap Thank you for your review, I updated and rebased main branch. |
Ack, sorry for the conflicts! I'm happy to attempt to resolve them. |
The conflicts were straightforward, but follow-up changes will be needed to re-add the |
@meatballhat I'll fix it later, that's OK. |
@xwjdsh I'm happy to carry this work forward if you're not able ❤️ |
Sorry for being late, I updated. Update |
@xwjdsh I'm sorry about this frustrating feedback loop with having to approve GitHub Actions 😩 |
@meatballhat I'm a little bit confused about the CI error, my local environment is normal... |
@xwjdsh @meatballhat Is one of you looking at the test failures and conflicts ? |
Not me! |
a06ae28
to
b331176
Compare
@dearchap It's OK now. |
// ActionableFlag is an interface that wraps Flag interface and RunAction operation. | ||
type ActionableFlag interface { | ||
Flag | ||
RunAction(*Context) error |
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.
Do you think RunAction might need Flag itself as an arg ?
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/CycloneDX/cyclonedx-go](https://github.com/CycloneDX/cyclonedx-go) | require | minor | `v0.6.0` -> `v0.7.0` | | [github.com/jedib0t/go-pretty/v6](https://github.com/jedib0t/go-pretty) | require | minor | `v6.3.9` -> `v6.4.0` | | [github.com/urfave/cli/v2](https://github.com/urfave/cli) | require | minor | `v2.16.3` -> `v2.17.1` | | [golang.org/x/crypto](https://github.com/golang/crypto) | require | digest | `eccd636` -> `4161e89` | | [golang.org/x/exp](https://github.com/golang/exp) | require | digest | `439092d` -> `b9f4876` | | [golang.org/x/term](https://github.com/golang/term) | require | digest | `7de9c90` -> `7a66f97` | --- ### Release Notes <details> <summary>CycloneDX/cyclonedx-go</summary> ### [`v0.7.0`](https://github.com/CycloneDX/cyclonedx-go/releases/tag/v0.7.0) [Compare Source](https://github.com/CycloneDX/cyclonedx-go/compare/v0.6.0...v0.7.0) #### Changelog ##### Features - [`acb9322`](https://github.com/CycloneDX/cyclonedx-go/commit/acb932270c1594cb44c052ebeacfe4400c25e30b): feat: add enum for official media types ([@​nscuro](https://github.com/nscuro)) - [`2826fe2`](https://github.com/CycloneDX/cyclonedx-go/commit/2826fe20711931e40df00c2d9058232b6c4ec8af): feat: add support for encoding to older spec versions ([#​51](https://github.com/CycloneDX/cyclonedx-go/issues/51)) ([@​nscuro](https://github.com/nscuro)) - [`7a2113a`](https://github.com/CycloneDX/cyclonedx-go/commit/7a2113a1d5cdbc27b170ce7a487cc13a108950f5): feat: raise baseline go version to 1.17 ([#​53](https://github.com/CycloneDX/cyclonedx-go/issues/53)) ([@​nscuro](https://github.com/nscuro)) - [`7415143`](https://github.com/CycloneDX/cyclonedx-go/commit/7415143fe9af48fafb4bd823cfd1dc1aaea9084e): feat: return error when parsing unknown spec versions ([@​nscuro](https://github.com/nscuro)) - [`1655b7d`](https://github.com/CycloneDX/cyclonedx-go/commit/1655b7dad8bb4e1cc7c402fac75dddf998dc5621): feat: set `SpecVersion` when decoding from xml ([@​nscuro](https://github.com/nscuro)) - [`f97e04a`](https://github.com/CycloneDX/cyclonedx-go/commit/f97e04a588544317e666deae16fbff4b4b1a89c5): feat: update gitpod dockerfile ([@​nscuro](https://github.com/nscuro)) ##### Fixes - [`ea0d5b7`](https://github.com/CycloneDX/cyclonedx-go/commit/ea0d5b79fe245884a46d7537271d0d951d46ad1a): fix: prevent nesting of `Dependency` ([@​nscuro](https://github.com/nscuro)) ##### Building and Packaging - [`f43660c`](https://github.com/CycloneDX/cyclonedx-go/commit/f43660c92e8aa58b574b90395330c2d423d87e54): build(deps): bump actions/setup-go from 3.1.0 to 3.2.0 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`2458312`](https://github.com/CycloneDX/cyclonedx-go/commit/245831215bceb60ad7c0b237819dadf6fb185a4e): build(deps): bump actions/setup-go from 3.2.0 to 3.2.1 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`760fae3`](https://github.com/CycloneDX/cyclonedx-go/commit/760fae3319dd04b9f95659eca5cada2dcedb885e): build(deps): bump actions/setup-go from 3.2.1 to 3.3.0 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`4dddf51`](https://github.com/CycloneDX/cyclonedx-go/commit/4dddf51ddd4be68d6c0f35adef628acd36eae0ab): build(deps): bump apache/skywalking-eyes from 0.3.0 to 0.4.0 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`6eb6521`](https://github.com/CycloneDX/cyclonedx-go/commit/6eb6521f71afc72eef65bf97033e1197a778ddab): build(deps): bump github.com/bradleyjkemp/cupaloy/v2 from 2.7.0 to 2.8.0 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`bff00ef`](https://github.com/CycloneDX/cyclonedx-go/commit/bff00ef23cf6cdcd520c179f995aabc83cc955b9): build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`fc11b56`](https://github.com/CycloneDX/cyclonedx-go/commit/fc11b56380ce3c547d34194a39c3ef736e6c8397): build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.4 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`f521d75`](https://github.com/CycloneDX/cyclonedx-go/commit/f521d75e187d6f2ca3ce289cfa4afbd961b04402): build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`d5d1ab6`](https://github.com/CycloneDX/cyclonedx-go/commit/d5d1ab6ca40e8ef882d6e51e1ebcb4ce72fcb805): build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0 ([@​dependabot](https://github.com/dependabot)\[bot]) - [`b83bbe8`](https://github.com/CycloneDX/cyclonedx-go/commit/b83bbe808f6545654d4e0deecc7e7806a2e49c4e): build(deps): bump goreleaser/goreleaser-action from 2 to 3 ([@​dependabot](https://github.com/dependabot)\[bot]) ##### Documentation - [`8f8fadf`](https://github.com/CycloneDX/cyclonedx-go/commit/8f8fadfe296ad32dd78f513cd7475e81ed85e200): docs: fix cyclonedx-go version in compatibility matrix ([@​nscuro](https://github.com/nscuro)) - [`124f2be`](https://github.com/CycloneDX/cyclonedx-go/commit/124f2be91434d720dd5d3149d7ab04461405c207): docs: fix typos ([@​nscuro](https://github.com/nscuro)) ##### Others - [`5f10aea`](https://github.com/CycloneDX/cyclonedx-go/commit/5f10aea00cf46bbe3a4ce66ce2b85bd17576a35c): refactor: refine spec version conversion to cover more cases ([@​nscuro](https://github.com/nscuro)) - [`0c2ebff`](https://github.com/CycloneDX/cyclonedx-go/commit/0c2ebff85af58497076969010e3bb29f62f19f16): refactor: separate custom marshalling logic from model ([@​nscuro](https://github.com/nscuro)) </details> <details> <summary>jedib0t/go-pretty</summary> ### [`v6.4.0`](https://github.com/jedib0t/go-pretty/releases/tag/v6.4.0) [Compare Source](https://github.com/jedib0t/go-pretty/compare/v6.3.9...v6.4.0) ### Features - **progress** - option to set Pinned Message(s) above active Trackers (thanks to [@​iyear](https://github.com/iyear)) </details> <details> <summary>urfave/cli</summary> ### [`v2.17.1`](https://github.com/urfave/cli/releases/tag/v2.17.1) [Compare Source](https://github.com/urfave/cli/compare/v2.17.0...v2.17.1) #### What's Changed - Fix help results inconsistency by [@​dearchap](https://github.com/dearchap) in [https://github.com/urfave/cli/pull/1499](https://github.com/urfave/cli/pull/1499) **Full Changelog**: urfave/cli@v2.17.0...v2.17.1 ### [`v2.17.0`](https://github.com/urfave/cli/releases/tag/v2.17.0) [Compare Source](https://github.com/urfave/cli/compare/v2.16.6...v2.17.0) #### What's Changed - Flag-level Action by [@​xwjdsh](https://github.com/xwjdsh) in [https://github.com/urfave/cli/pull/1337](https://github.com/urfave/cli/pull/1337) #### New Contributors - [@​xwjdsh](https://github.com/xwjdsh) made their first contribution in [https://github.com/urfave/cli/pull/1337](https://github.com/urfave/cli/pull/1337) **Full Changelog**: urfave/cli@v2.16.6...v2.17.0 ### [`v2.16.6`](https://github.com/urfave/cli/releases/tag/v2.16.6) [Compare Source](https://github.com/urfave/cli/compare/v2.16.5...v2.16.6) #### What's Changed - fix: Context.Set no such flag by [@​Torwang1](https://github.com/Torwang1) in [https://github.com/urfave/cli/pull/1497](https://github.com/urfave/cli/pull/1497) #### New Contributors - [@​Torwang1](https://github.com/Torwang1) made their first contribution in [https://github.com/urfave/cli/pull/1497](https://github.com/urfave/cli/pull/1497) **Full Changelog**: urfave/cli@v2.16.5...v2.16.6 ### [`v2.16.5`](https://github.com/urfave/cli/releases/tag/v2.16.5) [Compare Source](https://github.com/urfave/cli/compare/v2.16.4...v2.16.5) #### What's Changed - Fix:(issue\_1197) Set destination field from altsrc for slice flags by [@​dearchap](https://github.com/dearchap) in [https://github.com/urfave/cli/pull/1495](https://github.com/urfave/cli/pull/1495) **Full Changelog**: urfave/cli@v2.16.4...v2.16.5 ### [`v2.16.4`](https://github.com/urfave/cli/releases/tag/v2.16.4) [Compare Source](https://github.com/urfave/cli/compare/v2.16.3...v2.16.4) #### What's Changed - Accept the `MKDOCS_REMOTE_GITHUB_TOKEN` var as intended by [@​meatballhat](https://github.com/meatballhat) in [https://github.com/urfave/cli/pull/1493](https://github.com/urfave/cli/pull/1493) **Full Changelog**: urfave/cli@v2.16.3...v2.16.4 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 6am on monday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/google/osv.dev). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzMi4yMTMuMCIsInVwZGF0ZWRJblZlciI6IjMyLjIxNi4wIn0=--> Co-authored-by: Rex P <[email protected]>
What type of PR is this?
What this PR does / why we need it:
#1219
I like the idea, but there is no comment from the maintainers, I'd like to have a simple implementation first and then hear your opinions.
Example
Which issue(s) this PR fixes:
close #1219