Skip to content

run fails for lack of permissions #416

@tpapp

Description

@tpapp

In repositories I created recently the action fails when pushing the branch, eg

[ Info: Commit was a success
remote: 
remote: Create a pull request for 'compathelper/new_version/2022-05-11-01-57-46-585-02097311513' on GitHub by visiting:        
remote:      https://github.com/tpapp/SensitivityAnalysis.jl/pull/new/compathelper/new_version/2022-05-11-01-57-46-585-02097311513        
remote: 
To github.com:tpapp/SensitivityAnalysis.jl.git
 * [new branch]      compathelper/new_version/2022-05-11-01-57-46-585-02097311513 -> compathelper/new_version/2022-05-11-01-57-46-585-02097311513
ERROR: LoadError: GitForge.HTTPError{HTTP.ExceptionRequest.StatusError}(HTTP.Messages.Response:

In the Set up job part, I see

GITHUB_TOKEN Permissions
  Contents: read
  Metadata: read

In the older repos I have, CompatHelper runs just fine, with permissions

  Actions: write
  Checks: write
  Contents: write
  Deployments: write
  Discussions: write
  Issues: write
  Metadata: read
  Packages: write
  Pages: write
  PullRequests: write
  RepositoryProjects: write
  SecurityEvents: write
  Statuses: write

I think the defaults changed recently. New repos now have
1

Changing that to
2

fixes things (both changes are necessary). More granular control is possible via yaml files.

Perhaps the README could mention this.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions