From 2cdabffda22779b5442926a19d51a3138ce513ed Mon Sep 17 00:00:00 2001 From: Moritz Tim W <90388353+moritz-t-w@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:35:25 +0100 Subject: [PATCH 1/7] Render issue templates pre commit --- .githooks/pre-commit | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 82ce892e9..c94bc0d22 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -6,3 +6,10 @@ if [[ $files =~ .circleci/config.pkl ]]; then pkl eval .circleci/config.pkl -o .circleci/config.yml git add .circleci/config.yml fi + +if [[ $files =~ \.github/ISSUE_TEMPLATE/.*\.pkl ]]; then + for file in .github/ISSUE_TEMPLATE/*.pkl; do + pkl eval $file -f yaml -o ${file%.pkl}.yml + git add ${file%.pkl}.yml + done +fi From 4432791fb918517f9f6053c11f5524b8fc8f41a2 Mon Sep 17 00:00:00 2001 From: Moritz Tim W <90388353+moritz-t-w@users.noreply.github.com> Date: Tue, 13 Feb 2024 15:42:38 +0100 Subject: [PATCH 2/7] Create language bindings request form --- .../language_bindings_request.pkl | 69 +++++++++++++++++++ .../language_bindings_request.yml | 44 ++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/language_bindings_request.pkl create mode 100644 .github/ISSUE_TEMPLATE/language_bindings_request.yml diff --git a/.github/ISSUE_TEMPLATE/language_bindings_request.pkl b/.github/ISSUE_TEMPLATE/language_bindings_request.pkl new file mode 100644 index 000000000..2295d79f1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/language_bindings_request.pkl @@ -0,0 +1,69 @@ +name = "Language Bindings Request" +description = "Request for Pkl bindings for a programming language." +title = "[Bindings Request]: " +labels { + "bindings" + "enhancement" +} +body { + new { + type = "markdown" + attributes { + value = """ + ## Language Bindings Request + Thank you for your interest in expanding the compatibility of Pkl! + Before you fill out this request form, please do the following: + - Check the [documentation](https://pkl-lang.org/main/current/language-bindings.html) to confirm that this language isn't already supported. + - Search for [existing issues and pull requests](https://github.com/apple/pkl/issues?q="label%3Alanguage-bindings+) to ensure this bindings request has not already been submitted." + """ + } + } + new { + type = "checkboxes" + id = "readiness" + attributes { + label = "Confirmation" + description = "Please confirm the following items before submitting a new request." + options { + new { + label = "I have checked the documentation to confirm this language isn't already supported." + required = true + } + new { + label = "I have searched for existing issues and pull requests to ensure this bindings request has not already been submitted." + required = true + } + } + } + } + new { + type = "input" + id = "language-name" + attributes { + label = "Language Name" + description = "What is the name of the programming language for which you're requesting bindings?" + } + validations { + required = true + } + } + new { + type = "textarea" + id = "pitch" + attributes { + label = "Pitch" + description = "Why should we add support for this language?" + } + } + new { + type = "textarea" + id = "additional-info" + attributes { + label = "Additional Information (Optional)" + description = "Any other information you'd like to add" + } + validations { + required = false + } + } +} diff --git a/.github/ISSUE_TEMPLATE/language_bindings_request.yml b/.github/ISSUE_TEMPLATE/language_bindings_request.yml new file mode 100644 index 000000000..10e04aed9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/language_bindings_request.yml @@ -0,0 +1,44 @@ +name: Language Bindings Request +description: Request for Pkl bindings for a programming language. +title: '[Bindings Request]: ' +labels: +- bindings +- enhancement +body: +- type: markdown + attributes: + value: |- + ## Language Bindings Request + Thank you for your interest in expanding the compatibility of Pkl! + Before you fill out this request form, please do the following: + - Check the [documentation](https://pkl-lang.org/main/current/language-bindings.html) to confirm that this language isn't already supported. + - Search for [existing issues and pull requests](https://github.com/apple/pkl/issues?q="label%3Alanguage-bindings+) to ensure this bindings request has not already been submitted." +- type: checkboxes + id: readiness + attributes: + label: Confirmation + description: Please confirm the following items before submitting a new request. + options: + - label: I have checked the documentation to confirm this language isn't already supported. + required: true + - label: I have searched for existing issues and pull requests to ensure this bindings request has not already been submitted. + required: true +- type: input + id: language-name + attributes: + label: Language Name + description: What is the name of the programming language for which you're requesting bindings? + validations: + required: true +- type: textarea + id: pitch + attributes: + label: Pitch + description: Why should we add support for this language? +- type: textarea + id: additional-info + attributes: + label: Additional Information (Optional) + description: Any other information you'd like to add + validations: + required: false From 0674ca52df7c109f65b1c96464b5ff55db6e1343 Mon Sep 17 00:00:00 2001 From: Moritz Tim W <90388353+moritz-t-w@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:06:26 +0100 Subject: [PATCH 3/7] Consistent label name --- .github/ISSUE_TEMPLATE/language_bindings_request.pkl | 2 +- .github/ISSUE_TEMPLATE/language_bindings_request.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/language_bindings_request.pkl b/.github/ISSUE_TEMPLATE/language_bindings_request.pkl index 2295d79f1..e2bd2477d 100644 --- a/.github/ISSUE_TEMPLATE/language_bindings_request.pkl +++ b/.github/ISSUE_TEMPLATE/language_bindings_request.pkl @@ -14,7 +14,7 @@ body { Thank you for your interest in expanding the compatibility of Pkl! Before you fill out this request form, please do the following: - Check the [documentation](https://pkl-lang.org/main/current/language-bindings.html) to confirm that this language isn't already supported. - - Search for [existing issues and pull requests](https://github.com/apple/pkl/issues?q="label%3Alanguage-bindings+) to ensure this bindings request has not already been submitted." + - Search for [existing issues and pull requests](https://github.com/apple/pkl/issues?q="label%3Abindings+) to ensure this bindings request has not already been submitted." """ } } diff --git a/.github/ISSUE_TEMPLATE/language_bindings_request.yml b/.github/ISSUE_TEMPLATE/language_bindings_request.yml index 10e04aed9..6325770c2 100644 --- a/.github/ISSUE_TEMPLATE/language_bindings_request.yml +++ b/.github/ISSUE_TEMPLATE/language_bindings_request.yml @@ -12,7 +12,7 @@ body: Thank you for your interest in expanding the compatibility of Pkl! Before you fill out this request form, please do the following: - Check the [documentation](https://pkl-lang.org/main/current/language-bindings.html) to confirm that this language isn't already supported. - - Search for [existing issues and pull requests](https://github.com/apple/pkl/issues?q="label%3Alanguage-bindings+) to ensure this bindings request has not already been submitted." + - Search for [existing issues and pull requests](https://github.com/apple/pkl/issues?q="label%3Abindings+) to ensure this bindings request has not already been submitted." - type: checkboxes id: readiness attributes: From 7df437589fd9df10f554218cb9d6131c884f057d Mon Sep 17 00:00:00 2001 From: Moritz Tim W <90388353+moritz-t-w@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:20:37 +0100 Subject: [PATCH 4/7] Create output format request form --- .../ISSUE_TEMPLATE/output_format_request.pkl | 69 +++++++++++++++++++ .../ISSUE_TEMPLATE/output_format_request.yml | 44 ++++++++++++ 2 files changed, 113 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/output_format_request.pkl create mode 100644 .github/ISSUE_TEMPLATE/output_format_request.yml diff --git a/.github/ISSUE_TEMPLATE/output_format_request.pkl b/.github/ISSUE_TEMPLATE/output_format_request.pkl new file mode 100644 index 000000000..0648c0a90 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/output_format_request.pkl @@ -0,0 +1,69 @@ +name = "Output Format Request" +description = "Request for a output format to be added to Pkl" +title = "[Output Format Request]: " +labels { + "output-formats" + "enhancement" +} +body { + new { + type = "markdown" + attributes { + value = """ + ## Output Format Request + Thank you for your interest in expanding the compatibility of Pkl! + Before you fill out this request form, please do the following: + - Check the [documentation](https://pkl-lang.org/main/current/pkl-cli/index.html#options) (under `-f`, `--format`) to confirm that this format isn't already supported. + - Search for [existing issues and pull requests](https://github.com/apple/pkl/issues?q="label%3Arender-formats+) to ensure this output format request has not already been submitted." + """ + } + } + new { + type = "checkboxes" + id = "readiness" + attributes { + label = "Confirmation" + description = "Please confirm the following items before submitting a new request." + options { + new { + label = "I have checked the documentation to confirm this format isn't already supported." + required = true + } + new { + label = "I have searched for existing issues and pull requests to ensure this rendering request has not already been submitted." + required = true + } + } + } + } + new { + type = "input" + id = "format-name" + attributes { + label = "Format Name" + description = "What is the name of the configuration format that you are requesting to be added?" + } + validations { + required = true + } + } + new { + type = "textarea" + id = "pitch" + attributes { + label = "Pitch" + description = "Why should we add support for this format?" + } + } + new { + type = "textarea" + id = "additional-info" + attributes { + label = "Additional Information (Optional)" + description = "Any other information you'd like to add" + } + validations { + required = false + } + } +} diff --git a/.github/ISSUE_TEMPLATE/output_format_request.yml b/.github/ISSUE_TEMPLATE/output_format_request.yml new file mode 100644 index 000000000..96ada614f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/output_format_request.yml @@ -0,0 +1,44 @@ +name: Output Format Request +description: Request for a output format to be added to Pkl +title: '[Output Format Request]: ' +labels: +- output-formats +- enhancement +body: +- type: markdown + attributes: + value: |- + ## Output Format Request + Thank you for your interest in expanding the compatibility of Pkl! + Before you fill out this request form, please do the following: + - Check the [documentation](https://pkl-lang.org/main/current/pkl-cli/index.html#options) (under `-f`, `--format`) to confirm that this format isn't already supported. + - Search for [existing issues and pull requests](https://github.com/apple/pkl/issues?q="label%3Arender-formats+) to ensure this output format request has not already been submitted." +- type: checkboxes + id: readiness + attributes: + label: Confirmation + description: Please confirm the following items before submitting a new request. + options: + - label: I have checked the documentation to confirm this format isn't already supported. + required: true + - label: I have searched for existing issues and pull requests to ensure this rendering request has not already been submitted. + required: true +- type: input + id: format-name + attributes: + label: Format Name + description: What is the name of the configuration format that you are requesting to be added? + validations: + required: true +- type: textarea + id: pitch + attributes: + label: Pitch + description: Why should we add support for this format? +- type: textarea + id: additional-info + attributes: + label: Additional Information (Optional) + description: Any other information you'd like to add + validations: + required: false From cc5bf1db62327a48acfc64c692d68f95cdb98099 Mon Sep 17 00:00:00 2001 From: Moritz Tim W <90388353+moritz-t-w@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:22:15 +0100 Subject: [PATCH 5/7] Mark yml output for language bindings form as generated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Philip K.F. Hölzenspies --- .github/ISSUE_TEMPLATE/language_bindings_request.pkl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/language_bindings_request.pkl b/.github/ISSUE_TEMPLATE/language_bindings_request.pkl index e2bd2477d..4fa1f379c 100644 --- a/.github/ISSUE_TEMPLATE/language_bindings_request.pkl +++ b/.github/ISSUE_TEMPLATE/language_bindings_request.pkl @@ -67,3 +67,10 @@ body { } } } + +output { + text = """ + # This file is GENERATED and should not be edited manually. Edit \(reflect.Module(module).name).pkl instead. + \(super.text) + """ +} From 7f3560fb604cc67cda940c64d1cd8e74bc6e7c7b Mon Sep 17 00:00:00 2001 From: Moritz Tim W <90388353+moritz-t-w@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:24:44 +0100 Subject: [PATCH 6/7] Ensure outputs are marked as generated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Philip K.F. Hölzenspies <1875918+holzensp@users.noreply.github.com> --- .github/ISSUE_TEMPLATE/language_bindings_request.pkl | 1 + .github/ISSUE_TEMPLATE/language_bindings_request.yml | 1 + .github/ISSUE_TEMPLATE/output_format_request.pkl | 8 ++++++++ .github/ISSUE_TEMPLATE/output_format_request.yml | 1 + 4 files changed, 11 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/language_bindings_request.pkl b/.github/ISSUE_TEMPLATE/language_bindings_request.pkl index 4fa1f379c..05a2b195a 100644 --- a/.github/ISSUE_TEMPLATE/language_bindings_request.pkl +++ b/.github/ISSUE_TEMPLATE/language_bindings_request.pkl @@ -1,3 +1,4 @@ +import "pkl:reflect" name = "Language Bindings Request" description = "Request for Pkl bindings for a programming language." title = "[Bindings Request]: " diff --git a/.github/ISSUE_TEMPLATE/language_bindings_request.yml b/.github/ISSUE_TEMPLATE/language_bindings_request.yml index 6325770c2..7235d3d2a 100644 --- a/.github/ISSUE_TEMPLATE/language_bindings_request.yml +++ b/.github/ISSUE_TEMPLATE/language_bindings_request.yml @@ -1,3 +1,4 @@ +# This file is GENERATED and should not be edited manually. Edit language_bindings_request.pkl instead. name: Language Bindings Request description: Request for Pkl bindings for a programming language. title: '[Bindings Request]: ' diff --git a/.github/ISSUE_TEMPLATE/output_format_request.pkl b/.github/ISSUE_TEMPLATE/output_format_request.pkl index 0648c0a90..a3549fdbf 100644 --- a/.github/ISSUE_TEMPLATE/output_format_request.pkl +++ b/.github/ISSUE_TEMPLATE/output_format_request.pkl @@ -1,3 +1,4 @@ +import "pkl:reflect" name = "Output Format Request" description = "Request for a output format to be added to Pkl" title = "[Output Format Request]: " @@ -67,3 +68,10 @@ body { } } } + +output { + text = """ + # This file is GENERATED and should not be edited manually. Edit \(reflect.Module(module).name).pkl instead. + \(super.text) + """ +} diff --git a/.github/ISSUE_TEMPLATE/output_format_request.yml b/.github/ISSUE_TEMPLATE/output_format_request.yml index 96ada614f..39b04cd1a 100644 --- a/.github/ISSUE_TEMPLATE/output_format_request.yml +++ b/.github/ISSUE_TEMPLATE/output_format_request.yml @@ -1,3 +1,4 @@ +# This file is GENERATED and should not be edited manually. Edit output_format_request.pkl instead. name: Output Format Request description: Request for a output format to be added to Pkl title: '[Output Format Request]: ' From 61b2c1b754002bdf1e943159605bff53b07282a3 Mon Sep 17 00:00:00 2001 From: Moritz Tim W <90388353+moritz-t-w@users.noreply.github.com> Date: Wed, 15 May 2024 12:52:46 +0200 Subject: [PATCH 7/7] Simplify commit hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Philip K.F. Hölzenspies --- .githooks/pre-commit | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index c94bc0d22..5b09f5ba4 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -8,8 +8,6 @@ if [[ $files =~ .circleci/config.pkl ]]; then fi if [[ $files =~ \.github/ISSUE_TEMPLATE/.*\.pkl ]]; then - for file in .github/ISSUE_TEMPLATE/*.pkl; do - pkl eval $file -f yaml -o ${file%.pkl}.yml - git add ${file%.pkl}.yml - done + pkl eval -m .github/ISSUE_TEMPLATE{,/*.pkl} + git add .github/ISSUE_TEMPLATE/*.yml fi