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

feat: add license during init command #1475

Merged
merged 12 commits into from
Nov 25, 2024
Merged

Conversation

hetangmodi-crest
Copy link
Contributor

@hetangmodi-crest hetangmodi-crest commented Nov 22, 2024

Issue number: ADDON 76513

PR Type

What kind of change does this PR introduce?

  • Feature
  • Bug Fix
  • Refactoring (no functional or API changes)
  • Documentation Update
  • Maintenance (dependency updates, CI, etc.)

Summary

Provided an optional flag (--add-license) to generate a skeleton TA with predefined licenses.

Changes

Introduced an optional --add-license flag in the ucc-gen init command. This flag allows you to include a license agreement file for popular licenses such as Apache License 2.0, MIT License, or SPLUNK PRE-RELEASE SOFTWARE LICENSE AGREEMENT in the addon_name/package/LICENSES folder. If the input does not match one of these licenses, the add-on will fail to build.

If the flag is not provided, an empty License.txt file will be created in the addon_name/package/LICENSES directory for users.

User experience

User can now add their licenses using the flag --add-licences while initializing the add-on.

Checklist

If an item doesn't apply to your changes, leave it unchecked.

@hetangmodi-crest hetangmodi-crest added the enhancement New feature or request label Nov 22, 2024
@hetangmodi-crest hetangmodi-crest self-assigned this Nov 22, 2024
[
(
{
"addon_name": "foo/bar",
Copy link
Member

Choose a reason for hiding this comment

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

That's an interesting test, should we allow foo/bar as an add-on name for the ucc-gen init command?

That's out of scope for this PR but worth checking our validations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, we don't allow foo/bar as an addon-name, it's also mentioned in one of the unit test case
In the recent push I had changed the name to splunk_add_on_for_demo.

artemrys
artemrys previously approved these changes Nov 25, 2024
Copy link
Member

@artemrys artemrys left a comment

Choose a reason for hiding this comment

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

LGTM

@artemrys
Copy link
Member

oopsie, tests are failing, @hetangmodi-crest please take a look.

@hetangmodi-crest
Copy link
Contributor Author

Fixed the smoke and umit test cases.

@artemrys artemrys enabled auto-merge (squash) November 25, 2024 16:13
@artemrys artemrys merged commit 471294a into develop Nov 25, 2024
98 checks passed
@artemrys artemrys deleted the feat/add-license-during-init branch November 25, 2024 16:32
@github-actions github-actions bot locked and limited conversation to collaborators Nov 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants