forgejo-hooks: Add support for Issue
Signed-off-by: pep <pep@bouah.net>
This commit is contained in:
parent
5979b049f9
commit
a6195d68de
3 changed files with 307 additions and 32 deletions
|
|
@ -13,7 +13,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
use crate::{Hook, Push};
|
||||
use crate::{Hook, Issue, Push};
|
||||
use serde::Deserialize;
|
||||
|
||||
/// Deserializes the payload into a struct
|
||||
|
|
@ -52,3 +52,9 @@ fn push_payload() {
|
|||
let payload = std::fs::read_to_string("src/tests/push.json").unwrap();
|
||||
let _ = parse_roundtrip::<Push>(&payload);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_opened_payload() {
|
||||
let payload = std::fs::read_to_string("src/tests/issue.json").unwrap();
|
||||
let _ = parse_roundtrip::<Issue>(&payload);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue