Skip to content

Commit 5f83952

Browse files
authored
Merge pull request #564 from github/project_url
Document project_url field
2 parents 4792025 + 316bd0b commit 5f83952

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The licenses on choosealicense.com are regularly imported to GitHub.com to be us
6969
* `project` - The repository name
7070
* `description` - The description of the repository
7171
* `year` - The current year
72+
* `project_url` - The repository URL or other project website
7273

7374
## License properties
7475

_data/fields.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121

2222
- name: year
2323
description: The current year
24+
25+
- name: project_url
26+
description: The repository URL or other project website

spec/license_fields_spec.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
describe 'license fillable fields' do
6+
licenses.each do |license|
7+
context "The #{license['title']} license" do
8+
it 'should only contain supported fillable fields' do
9+
matches = license['content'][1, 1000].scan(/\s+\[([a-z_]+)\]/)
10+
extra_fields = matches.flatten - (fields.map { |f| f['name'] })
11+
expect(extra_fields).to be_empty
12+
end
13+
end
14+
end
15+
end

0 commit comments

Comments
 (0)