Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Indicate required permissions #122

Open
raspo opened this issue Feb 8, 2023 · 3 comments
Open

Indicate required permissions #122

raspo opened this issue Feb 8, 2023 · 3 comments
Assignees
Projects

Comments

@raspo
Copy link

raspo commented Feb 8, 2023

Please describe your suggestion: 提案の概要

This action uses API that fetch the status of other workflow step, as far as I can tell this requires actions: read permission.
The documentation should mention the required permissions to run this action.

Describe the solution you'd like: 考えうる解決方法

Add a "troubleshooting" section in the README, maybe in the form of an FAQ, something like:

Why am I receiving this error [HttpError]: Resource not accessible by integration?

You are probably specifying permissions in your workflow, make sure to add actions: read.

In your workflow file:

permissions:
 actions: read

Describe alternatives you've considered: 考えうる代替案

Handle this specific error case in the code and suggest updating the permissions right from the action's log.

Additional context: 補足

When I first tried this action it would fail with this error:
CleanShot 2023-02-08 at 11 03 12@2x

After a little bit of digging, I noticed that it was using this API to fetch workflow job, that according to its documentation requires the actions: read permission.

It turns out that I was setting explicit permissions in my workflow and after adding actions: read it started working as expected.

Thank you for this action btw 🙏

@welcome
Copy link

welcome bot commented Feb 8, 2023

🙌 Thanks for opening your first issue here! Be sure to follow the issue template!

@github-actions github-actions bot added this to To do in Backlog Feb 8, 2023
@bitgandtter
Copy link

Anything to fix this?

@marcellodesales
Copy link

marcellodesales commented Apr 4, 2023

I'm getting the following:

 The nested job '📢 notify' is requesting 'actions: read', but is only allowed 'actions: none'

I see the failure exception showing the error indicating the method

https://docs.github.com/en/enterprise-server@3.7/rest/actions/workflow-jobs#list-jobs-for-a-workflow-run

However, it doesn't allow actions: read...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Backlog
  
To do
Development

No branches or pull requests

4 participants