replacement of placeholders in LICENSE templates that should NOT be replaced
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
When applying a license template, project-specific and author-specific information is inserted also at places, where placeholders should be retained.
Affected Licenses
- GNU Affero General Public License v3.0
- GNU General Public License v2.0
- GNU Lesser General Public License v2.1
- Apache License 2.0
- GNU General Public License v3.0
Unaffected Licenses
Probably no placeholders
- Boost Software License 1.0
- Creative Commons Zero v1.0 Universal
- Mozilla Public License 2.0
- The Unlicense
Placeholders that should be retained are retained
- Eclipse Public License 2.0
LICENSE
file itself
Replaced placeholders are meant to be replaced in the - BSD 2-Clause "Simplified" License
- BSD 3-Clause "New" or "Revised" License
- MIT License
Steps to reproduce
-
Create a new blank project, e.g. by
- going to https://gitlab.com/projects/new#blank_project
- typing in a valid new project name into the "Project name" field
- clicking the "Create project" button
- You'll be redirected to the new project's project overview page. There, click the "Add License" button (one of the several dashed buttons below the "The repository for this project is empty" label and above the command line instructions)
- In the "Choose a template..." drop-down above the editor, select "GNU Affero General Public License v3.0"
Example Project
- Section explaining how others can apply the license to other projects: https://gitlab.com/das-g/license-template-placeholders-bug/-/blob/master/LICENSE#L621-661
- Line containing actual information instead of placeholders: https://gitlab.com/das-g/license-template-placeholders-bug/-/blob/master/LICENSE#L633
What is the current bug behavior?
Instead of placeholders, the "How to Apply These Terms to Your New Programs" section contains the current year and the author name (your name, as specified in your GitHub account) in a quoted paragraph that should show how other people can apply the license to other projects when they see the license in your project.
What is the expected correct behavior?
Placeholders in the "How to Apply These Terms to Your New Programs" section after the actual license text are retained as placeholders and not replaced by author-specific or project-specific information or the current year, as the instructions there are meant to be filled in by someone who sees the license in this project and wants to apply it to yet another project.
Relevant logs and/or screenshots
n/a
Output of checks
This bug happens on GitLab.com
Possible fixes
Distinguish between placeholders for the template engine and placeholders intended for readers, probably by changing the contents of the template files. (I couldn't find where they're hosted, though.)