Skip to content

Commit

Permalink
feat: add support matrix shortcode
Browse files Browse the repository at this point in the history
Added a support matrix shortcode to the policy guide to indicate
which Git providers support specific features. This includes
GitHub App, GitHub Webhook, Gitea, GitLab, Bitbucket Cloud, and
Bitbucket Server.

Update pull_request default template so that the dev can communicate it
in the pull_request.

Signed-off-by: Chmouel Boudjnah <[email protected]>
  • Loading branch information
chmouel committed Dec 17, 2024
1 parent 7db78c0 commit 44058fd
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@ your descriptive commit message(s)! -->
- [ ] 🎁 If feasible, please check if an end-to-end test can be added. See [README](https://github.com/openshift-pipelines/pipelines-as-code/blob/main/test/README.md) for more details.

- [ ] 🔎 If there's any flakiness in the CI tests, don't necessarily ignore it. It's better to address the issue before merging, or provide a valid reason to bypass it if fixing isn't possible (e.g., token rate limitations).

- If you are adding a provider feature, please fill up the following details which provider this feature supports:

- [ ] GitHub
- [ ] GitHub Webhook
- [ ] Gitea
- [ ] Gitlab
- [ ] Bitbucket Cloud
- [ ] Bitbucket Server/DC

(make sure to update the documentation accordingly)
2 changes: 2 additions & 0 deletions docs/content/docs/guide/policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Pipelines-as-Code uses policies to control which actions can be performed by
users who belong to specific teams within an organization, as defined on GitHub
or other supported Git providers (currently GitHub and Gitea).

{{< support_matrix github_app="true" github_webhook="true" gitea="true" gitlab="false" bitbucket_cloud="false" bitbucket_server="false" >}}

## Supported Actions

* `pull_request` - This action triggers the CI in Pipelines-as-Code. Specifying
Expand Down
49 changes: 49 additions & 0 deletions docs/layouts/shortcodes/support_matrix.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{{ $gitlabSupported := .Get "gitlab" }} {{ $githubAppSupported := .Get
"github_app" }} {{ $githubWebhookSupported := .Get "github_webhook" }} {{
$giteaSupported := .Get "gitea" }} {{ $gitlabSupported := .Get "gitlab" }} {{
$bitbucketCloudSupported := .Get "bitbucket_cloud" }} {{
$bitbucketServerSupported := .Get "bitbucket_server" }}

<blockquote class="book-hint warning">
<p>This feature is supported on the following providers</p>
<table>
<thead>
<tr>
<th>Git Provider</th>
<th>Supported</th>
</tr>
</thead>
<tbody>
<tr>
<td>GitHub App</td>
<td>{{ if eq $githubAppSupported "true" }}✅️{{ else }}❌️{{ end }}</td>
</tr>
<tr>
<td>GitHub Webhook</td>
<td>
{{ if eq $githubWebhookSupported "true" }}✅️{{ else }}❌️{{ end }}
</td>
</tr>
<tr>
<td>Gitea</td>
<td>{{ if eq $giteaSupported "true" }}✅️{{ else }}❌️{{ end }}</td>
</tr>
<tr>
<td>GitLab</td>
<td>{{ if eq $gitlabSupported "true" }}✅️{{ else }}❌️{{ end }}</td>
</tr>
<tr>
<td>Bitbucket Cloud</td>
<td>
{{ if eq $bitbucketCloudSupported "true" }}✅️{{ else }}❌️{{ end }}
</td>
</tr>
<tr>
<td>Bitbucket Server</td>
<td>
{{ if eq $bitbucketServerSupported "true" }}✅️{{ else }}❌️{{ end }}
</td>
</tr>
</tbody>
</table>
</blockquote>

0 comments on commit 44058fd

Please sign in to comment.