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

Automatically add copyright header upon creating a new file #8984

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

remcowesterhoud
Copy link
Contributor

@remcowesterhoud remcowesterhoud commented Mar 25, 2022

Description

These settings in intellij will automatically add the correct copyright header to a new file that's created. By default it will add the Zeebe 1.1 license header. There are 5 exceptions to this:

  1. zeebe-java-client
  2. zeebe-exporter-api
  3. zeebe-protocol
  4. zeebe-gateway-protocol-impl
  5. zeebe-bpmn-model

For these 5 modules we will automatically add the Apache 2.0 license header.

The Go client should also be included in this list, however IntelliJ scopes only support the addition of packages. Since these packages are a Java concept we cannot include the Go files to these exceptions. No copyright header will be added automatically for new files in the go client.

Definition of Done

Not all items need to be done depending on the issue and the pull request.

Code changes:

  • The changes are backwards compatibility with previous versions
  • If it fixes a bug then PRs are created to backport the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. backport stable/1.3) to the PR, in case that fails you need to create backports manually.

Testing:

  • There are unit/integration tests that verify all acceptance criterias of the issue
  • New tests are written to ensure backwards compatibility with further versions
  • The behavior is tested manually
  • The change has been verified by a QA run
  • The impact of the changes is verified by a benchmark

Documentation:

  • The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
  • New content is added to the release announcement
  • If the PR changes how BPMN processes are validated (e.g. support new BPMN element) then the Camunda modeling team should be informed to adjust the BPMN linting.

@npepinpe npepinpe requested a review from korthout March 25, 2022 12:50
Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

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

Excellent! This will be a big QoL improvement 👍 It happens so often that I check in new classes without the license, but no more! 🚀

I did a bit of testing and it works really well. I've found 2 differences to the license headers being added via maven.

First, a blank line is added between the license header and the package definition. This is because of a formatting setting in IntelliJ.

🔧 Please disable it by adding to the .idea/copyright/profiles_settings.xml:

<LanguageOptions name="__TEMPLATE__">
  <option name="addBlankAfter" value="false" />
</LanguageOptions>

I've described the other difference in the comments.

.idea/copyright/Apache_2_0.xml Outdated Show resolved Hide resolved
@remcowesterhoud
Copy link
Contributor Author

bors merge

zeebe-bors-camunda bot added a commit that referenced this pull request Apr 1, 2022
8984: Automatically add copyright header upon creating a new file r=remcowesterhoud a=remcowesterhoud

## Description

<!-- Please explain the changes you made here. -->

These settings in intellij will automatically add the correct copyright header to a new file that's created. By default it will add the Zeebe 1.1 license header. There are 5 exceptions to this:

1. zeebe-java-client
2. zeebe-exporter-api
3. zeebe-protocol
4. zeebe-gateway-protocol-impl
5. zeebe-bpmn-model

For these 5 modules we will automatically add the Apache 2.0 license header.

The Go client should also be included in this list, however IntelliJ scopes only support the addition of packages. Since these packages are a Java concept we cannot include the Go files to these exceptions. No copyright header will be added automatically for new files in the go client.



Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
@zeebe-bors-camunda
Copy link
Contributor

Timed out.

@remcowesterhoud
Copy link
Contributor Author

bors retry

zeebe-bors-camunda bot added a commit that referenced this pull request Apr 1, 2022
8984: Automatically add copyright header upon creating a new file r=remcowesterhoud a=remcowesterhoud

## Description

<!-- Please explain the changes you made here. -->

These settings in intellij will automatically add the correct copyright header to a new file that's created. By default it will add the Zeebe 1.1 license header. There are 5 exceptions to this:

1. zeebe-java-client
2. zeebe-exporter-api
3. zeebe-protocol
4. zeebe-gateway-protocol-impl
5. zeebe-bpmn-model

For these 5 modules we will automatically add the Apache 2.0 license header.

The Go client should also be included in this list, however IntelliJ scopes only support the addition of packages. Since these packages are a Java concept we cannot include the Go files to these exceptions. No copyright header will be added automatically for new files in the go client.



Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
@remcowesterhoud
Copy link
Contributor Author

bors cancel

These settings in intellij will automatically add the correct copyright header to a new file that's created. By default it will add the Zeebe 1.1 license header. There are 5 exceptions to this:

1. zeebe-java-client
2. zeebe-exporter-api
3. zeebe-protocol
4. zeebe-gateway-protocol-impl
5. zeebe-bpmn-model

For these 5 modules we will automatically add the Apache 2.0 license header.

The Go client should also be included in this list, however IntelliJ scopes only support the addition of packages. Since these packages are a Java concept we cannot include the Go files to these exceptions. No copyright header will be added automatically for new files in the go client.
@zeebe-bors-camunda
Copy link
Contributor

Canceled.

@remcowesterhoud
Copy link
Contributor Author

bors merge

zeebe-bors-camunda bot added a commit that referenced this pull request Apr 1, 2022
8984: Automatically add copyright header upon creating a new file r=remcowesterhoud a=remcowesterhoud

## Description

<!-- Please explain the changes you made here. -->

These settings in intellij will automatically add the correct copyright header to a new file that's created. By default it will add the Zeebe 1.1 license header. There are 5 exceptions to this:

1. zeebe-java-client
2. zeebe-exporter-api
3. zeebe-protocol
4. zeebe-gateway-protocol-impl
5. zeebe-bpmn-model

For these 5 modules we will automatically add the Apache 2.0 license header.

The Go client should also be included in this list, however IntelliJ scopes only support the addition of packages. Since these packages are a Java concept we cannot include the Go files to these exceptions. No copyright header will be added automatically for new files in the go client.



Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
@zeebe-bors-camunda
Copy link
Contributor

Timed out.

@remcowesterhoud
Copy link
Contributor Author

remcowesterhoud commented Apr 1, 2022

Don't be lazy now bors 😢

bors merge

zeebe-bors-camunda bot added a commit that referenced this pull request Apr 1, 2022
8984: Automatically add copyright header upon creating a new file r=remcowesterhoud a=remcowesterhoud

## Description

<!-- Please explain the changes you made here. -->

These settings in intellij will automatically add the correct copyright header to a new file that's created. By default it will add the Zeebe 1.1 license header. There are 5 exceptions to this:

1. zeebe-java-client
2. zeebe-exporter-api
3. zeebe-protocol
4. zeebe-gateway-protocol-impl
5. zeebe-bpmn-model

For these 5 modules we will automatically add the Apache 2.0 license header.

The Go client should also be included in this list, however IntelliJ scopes only support the addition of packages. Since these packages are a Java concept we cannot include the Go files to these exceptions. No copyright header will be added automatically for new files in the go client.



Co-authored-by: Remco Westerhoud <remco@westerhoud.nl>
@zeebe-bors-camunda
Copy link
Contributor

Timed out.

@remcowesterhoud
Copy link
Contributor Author

😡

@remcowesterhoud remcowesterhoud merged commit 78c0ce9 into main Apr 1, 2022
@remcowesterhoud remcowesterhoud deleted the automatic_copyright_header branch April 1, 2022 13:03
@deepthidevaki deepthidevaki added the version:8.1.0-alpha1 Marks an issue as being completely or in parts released in 8.1.0-alpha1 label May 3, 2022
@Zelldon Zelldon added the version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0 label Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version:8.1.0-alpha1 Marks an issue as being completely or in parts released in 8.1.0-alpha1 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants