unity-test-runner icon indicating copy to clipboard operation
unity-test-runner copied to clipboard

Set ${{ github.token }} as a default value for githubToken

Open anatawa12 opened this issue 2 years ago • 10 comments

Changes

  • Set ${{ github.token }} as a default value for githubToken

Closes #209

Checklist

  • [x] Read the contribution guide and accept the code of conduct
  • [ ] Readme (updated or not needed)
  • [ ] Tests (added, updated or not needed)

anatawa12 avatar Dec 24 '22 10:12 anatawa12

Cat Gif

github-actions[bot] avatar Dec 24 '22 10:12 github-actions[bot]

The lint error is caused by https://github.com/game-ci/unity-test-runner/pull/206

The other errors I'd expect to pass, but I wont have time to look at it until later.

webbertakken avatar Dec 24 '22 11:12 webbertakken

If this default is changing, the docs should also be updated to show how to disable it (i.e. so we can use a different test reporter #142).

timcassell avatar Dec 24 '22 11:12 timcassell

The default isn't changing. This is just a documentation file. I don't think there's a real relation with that issue tbh.

webbertakken avatar Dec 24 '22 17:12 webbertakken

The default isn't changing. This is just a documentation file.

Huh? It looks like the point of this PR is to change the default. I don't get it.

I don't think there's a real relation with that issue tbh.

True, but I and others already have other test reporters set up (due to that issue), and changing this default will make our actions start double reporting test results if we don't manually remove it.

timcassell avatar Dec 24 '22 17:12 timcassell

Huh? It looks like the point of this PR is to change the default. I don't get it.

actions.yml is just a documentation file. This PR is only correcting that documentation to what is already happening. If I remember correctly the token is actually passed by default by GitHub Actions.

webbertakken avatar Dec 24 '22 22:12 webbertakken

I'm actually changing the default value so I may need to change the documentation.

Some part of action.yml including default is not just a documentation. It changes behavior.

anatawa12 avatar Dec 26 '22 20:12 anatawa12

Ah I didn't realise that this actually works now. The docs indeed say that it should work.

When GH Actions just started out (when we created this action) we actually held all the defaults in our code (or I've been ignorant of it all this time).

My bad.

webbertakken avatar Dec 26 '22 22:12 webbertakken

Looks like this is a breaking change for public repositories (like this very repo), because the default permissions from public PRs don't include writing the checks results. It's causing the workflows to fail with the following error:

Error: Resource not accessible by integration

Any ideas on how you'd solve that?

webbertakken avatar Dec 27 '22 01:12 webbertakken

First idea I come up with is ignoring permission error on uploading check results and make warning instead. This doesn't makes failure in most CI but this may be confusing.

Another idea is postpond this change to next major release. this is safer but I don't like this.

anatawa12 avatar Dec 27 '22 05:12 anatawa12