From 7a1590c1dff7a7112a6692faed9a12d0f002a072 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20El-Saig?= Date: Thu, 9 Jun 2022 02:02:50 +0200 Subject: [PATCH 1/3] Add "Submodule verify workflow" section to the readme. --- Readme.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Readme.md b/Readme.md index 494d307eb..002c28259 100644 --- a/Readme.md +++ b/Readme.md @@ -78,6 +78,25 @@ When `source` is not provided, it assumes a default value of pushing to the [Lom Valid values for `verbosity` are those defined by [MSBuild](https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild-command-line-reference?view=vs-2022#:~:text=you%20can%20specify%20the%20following%20verbosity%20levels). The default value is `minimal`. +### Submodule verify workflow + +Verifies if the submodule contains a JIRA style issue code (e.g. PROJ-123) and if a pull request exists for the parent module. Example _publish.yml_: + +```yaml +name: Verify Pull Request + +on: + pull_request: + +jobs: + call-verify-workflow: + uses: Lombiq/GitHub-Actions/.github/workflows/verify.yml@dev + with: + repo: Lombiq/Open-Source-Orchard-Core-Extensions +``` + +If this is for a submodule of [Lombiq's Open-Source Orchard Core Extensions](https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/), the `repo` input can be omitted, beucase the above is its default value. Otherwise use your parent repository's address in the `{owner}/{repo_name}` format. + Refer to [Github Actions reusable workflows](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#overview) for more information. From d494a256e670d0ddf74550ce05ee0d67f7c9d63b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1vid=20El-Saig?= Date: Thu, 9 Jun 2022 02:06:24 +0200 Subject: [PATCH 2/3] Use inputs.repo in the error message instead of hard coded "Open-Source-Orchard-Core-Extensions" --- .github/workflows/verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 336b1cf55..208e4926a 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -56,4 +56,4 @@ jobs: $issueCode = $Env:PULL_REQUEST_TITLE -replace '^\s*(\w+-\d+)\s*:.*$', '$1' $lookFor = "${issueCode}:" if (($titles | ? { $_ -and $_.Trim().StartsWith($lookFor) }).Count -gt 0) { exit 0 } - Set-Failed "Couldn't find any Open-Source-Orchard-Core-Extensions pull request whose title starts with `"$lookFor`". Please create one." + Set-Failed "Couldn't find any pull request whose title starts with `"$lookFor`" in ${{ inputs.repo }}. Please create one." From 089f7185207b091c798e0fccb9aad480bec6fb21 Mon Sep 17 00:00:00 2001 From: 0liver <0liver@users.noreply.github.com> Date: Sat, 11 Jun 2022 14:36:09 +0200 Subject: [PATCH 3/3] Typo and punctuation --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 002c28259..cbaf3a1a3 100644 --- a/Readme.md +++ b/Readme.md @@ -95,7 +95,7 @@ jobs: repo: Lombiq/Open-Source-Orchard-Core-Extensions ``` -If this is for a submodule of [Lombiq's Open-Source Orchard Core Extensions](https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/), the `repo` input can be omitted, beucase the above is its default value. Otherwise use your parent repository's address in the `{owner}/{repo_name}` format. +If this is for a submodule of [Lombiq's Open-Source Orchard Core Extensions](https://github.com/Lombiq/Open-Source-Orchard-Core-Extensions/), the `repo` input can be omitted, because the above is its default value. Otherwise, use your parent repository's address in the `{owner}/{repo_name}` format. Refer to [Github Actions reusable workflows](https://docs.github.com/en/actions/learn-github-actions/reusing-workflows#overview) for more information.