-
Notifications
You must be signed in to change notification settings - Fork 62
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
Question: Does this action work with pull requests from forks? #8
Comments
It works! But if it's a fork you need to do some changes.
If it's a fork you can't use the So, instead of having something like: steps:
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} You'll have: steps:
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_BOT_TOKEN }} If you don't want to create a new user you can create a personal token from any member of your organization. But then on every pull request, when autolabeled, instead of "github-bot have added some label" you'll have "This user has added some label". I guess it's the same problem you have with other Actions, the solution it's the same for everyone. 😊 |
Thanks so much @rgomezcasas I'll give that a try! |
@rgomezcasas I'm hoping you can help me a little more. I've followed the instructions above and this action is now working for PRs created from branches of the repo (see the PR where I added it where it was correctly labeled) This is the output of the action: The bot user I created |
@alexearnshaw @rgomezcasas I don't suppose anyone found any workaround or alternative for this to work from PRs from forks? Exactly the scenario I was hoping to cover. |
I resolved this by using https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target |
Hi, I'm looking for an app or action to label pull requests with a size based on LOC. This action looks perfect, but another similar action I tried did not work on PRs created from forks (which is the majority of PRs in our project). Can you confirm if this action will work on PRs from forks?
The text was updated successfully, but these errors were encountered: