NLeSC / python-template

Netherlands eScience Center Python Template
https://research-software-directory.org/software/nlesc-python-template
Apache License 2.0
164 stars 74 forks source link

add read/write permissions to allow issue creation #340

Closed bvreede closed 1 year ago

bvreede commented 1 year ago

Adding permissions to the workflow allows issues to be created.

See the first few lines of the action usage at https://github.com/JasonEtco/create-an-issue

I made this change in my own project, which fixed permissions to create issues, but still failed when deleting them.

This is fixed when also giving write permissions for content; see this action run.

Closes #332

bvreede commented 1 year ago

Failing windows tests still failing (see #326) >.<

egpbos commented 1 year ago

Why is it write + write here? In the example you linked to, you only used read + write.

@lyashevska does this fix your issue?

bvreede commented 1 year ago

@egpbos apologies for the late reply. No, I needed to set

permissions:
  contents: write
  issues: write

for the workflow to be able to run successfully, and be able to both create the issues, and subsequently delete the template files.

See this file in the commit where the workflow ran completely.

egpbos commented 1 year ago

Clear, LGTM!