italia / developers-italia-api

API for the developers.italia.it public software collection
https://api.developers.italia.it
GNU Affero General Public License v3.0
13 stars 7 forks source link

spectral-action doesn't fail on pull requests from forks #67

Open bfabio opened 2 years ago

bfabio commented 2 years ago

When a PR is opened from a fork, spectral-action doesn't fail if there are errors, but just adds annotation errors in the action logs.

This is tracked upstream as https://github.com/stoplightio/spectral-action/issues/624

bfabio commented 2 years ago

Tried a workaround with #80, but it didn't work.

My guess is that, since the action uses annotations, it has to have checks write permissions in the repo context, which it doesn't and can't have when the repo is a fork.

The action could comment on the PR content instead, but in that case it wouldn't be able to properly work on the whole file, given that GitHub doesn't support commenting on unchanged lines in a pull request yet.