Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resource not accessible by integration when trying examples #42

Closed
tiziano88 opened this issue Apr 22, 2020 · 4 comments · Fixed by #254
Closed

Resource not accessible by integration when trying examples #42

tiziano88 opened this issue Apr 22, 2020 · 4 comments · Fixed by #254

Comments

@tiziano88
Copy link

Namely, I am trying the Welcome a first-time contributor example, but I suspect because it operates on a PR, it gets a read-only token, and therefore it fails. Or am I missing something else?

@jclem
Copy link
Contributor

jclem commented May 18, 2020

For the time being, this is the case if the PR is from a fork of the repository. It's on the roadmap to change how that works, but currently that example will not function unless the PR is from a collaborator.

I'm going to consider removing the example until that's fixed.

@jclem jclem closed this as completed May 18, 2020
SudharakaP added a commit to jhipster/jhipster-online that referenced this issue Jul 28, 2020
Dues to actions/github-script#42, we have to operate on issues instead. 

Related to #203
SudharakaP added a commit to jhipster/jhipster-online that referenced this issue Jul 30, 2020
This creates problems with PRs created from forks as described here (actions/github-script#42) and using it on only issues is useless as the labels it acts on are only relevant to PRs.
@BastianZim
Copy link

BastianZim commented Jun 18, 2021

@jclem Would it be possible to keep this issue open until that's possible? Just to have a place to follow along.

Edit: Can be done with

on:
  pull_request_target:

derevnjuk added a commit to derevnjuk/tsed that referenced this issue Dec 30, 2021
derevnjuk added a commit to derevnjuk/tsed that referenced this issue Dec 30, 2021
derevnjuk added a commit to derevnjuk/tsed that referenced this issue Dec 30, 2021
derevnjuk added a commit to derevnjuk/tsed that referenced this issue Dec 30, 2021
derevnjuk added a commit to derevnjuk/tsed that referenced this issue Dec 30, 2021
derevnjuk added a commit to derevnjuk/tsed that referenced this issue Dec 30, 2021
derevnjuk added a commit to derevnjuk/tsed that referenced this issue Dec 30, 2021
derevnjuk added a commit to derevnjuk/tsed that referenced this issue Dec 30, 2021
@dgurns
Copy link

dgurns commented Dec 31, 2021

I solved this by going to Settings > Actions and giving read + write permissions to workflows.

derevnjuk added a commit to derevnjuk/tsed that referenced this issue Jan 3, 2022
@dineshba
Copy link

dineshba commented Jan 11, 2022

I solved it by adding below lines in the workflow

permissions:
  pull-requests: 'write'

Romakita pushed a commit to tsedio/tsed that referenced this issue Jan 17, 2022
derevnjuk added a commit to derevnjuk/tsed that referenced this issue Jan 29, 2022
dlech added a commit to dlech/github-script that referenced this issue Mar 30, 2022
Pull requests from forks do not have write permission, so we need to use `pull_request_target` instead of `pull_request` to enable write permission.

Fixes actions#42.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants