Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit e1a2014

Browse files
authored
bugfix: allow pull_request.types to be a scalar value (#41)
We already allowed this in `GenericEvent`, but not in `PullRequest`. See zizmorcore/zizmor#650 Signed-off-by: William Woodruff <[email protected]>
1 parent bc8423b commit e1a2014

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

src/workflow/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ pub struct GenericEvent {
198198
#[derive(Deserialize, Serialize, Debug)]
199199
#[serde(rename_all = "kebab-case")]
200200
pub struct PullRequest {
201-
#[serde(default)]
201+
#[serde(default, deserialize_with = "crate::common::scalar_or_vector")]
202202
pub types: Vec<String>,
203203

204204
#[serde(flatten)]
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# See https://github.com/woodruffw/zizmor/issues/650
2+
3+
# Copyright © Michal Čihař <[email protected]>
4+
#
5+
# SPDX-License-Identifier: CC0-1.0
6+
7+
# This file is maintained in https://github.com/WeblateOrg/meta/
8+
9+
name: Pull request automation
10+
11+
on:
12+
pull_request_target:
13+
types: opened
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
weblate_automerge:
20+
permissions:
21+
pull-requests: write
22+
contents: write
23+
runs-on: ubuntu-24.04
24+
name: Weblate automerge
25+
if: github.actor == 'weblate'
26+
steps:
27+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28+
- name: Enable Pull Request Automerge
29+
run: gh pr merge --rebase --auto "${{ github.event.pull_request.number }}"
30+
env:
31+
GH_TOKEN: ${{ secrets.WEBLATE_CI_TOKEN }}

0 commit comments

Comments
 (0)