Comments (11)
Hi, @brianeclow! Thanks for waiting.
I thought a good idea which checking exist assignees or reviewers before adding its to PR.
- Checking existed reviewers
- Skip the process to add reviewers if PR has reviewers
- Adding reviewers if no reviewers
- Checking existed assignees
- Skip the process to add assignees if PR has assignees
- Adding assignees if no assignees
I think it's better to control the skipping process as the logic of the application rather than the if syntax of the workflow.
If you have any concerns, please let me know.
from auto-assign-action.
@brianeclow //cc @kentaro-m You're searching for action to run only once. Usually it runs on every push on PR. So i think this will take care of it.
name: 'Auto Assign'
on:
pull_request:
types: [opened, reopened]
jobs:
add-reviews:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
from auto-assign-action.
We are running into the same issue too. For example if I create a non-draft, normal PR it assigns 2 reviewers. Let's say I instantly mark that PR as draft. Now when I mark it ready for review again, it adds 2 more reviewers which is not really expected.
from auto-assign-action.
Nope!
@vistaar-dgada That is not what I'm asking for at all. I already have the action run only once upon opening of the PR. I am looking for the action to be skipped if reviewers have already been set by someone when the PR was created. This means, the author has specific reviewers in mind, and adding new people confuses all involved.
If I am understanding correctly, the code can check the reviewer array, and act accordingly. And at that point, we could get options: no action taken, add reviewers from the pool to bring up to the desired total, add reviews from the pool, etc.
My ask is for at least no action
and add users from pool
.
from auto-assign-action.
Because of reviewer amount limitations in private repos in orgs this also results in unassigning the current reviewer on every push action (or in case of only updating on open and reopen on every open/reopen action).
We're also running into the issue that when assigning a reviewer during creation of a PR it gets overwritten immediately by the action.
from auto-assign-action.
I just managed to work around it for now by adding a condition to the job like this:
name: 'Auto Assign' on: pull_request: types: [opened, reopened] jobs: add-reviews: if: github.event.pull_request.requested_reviewers.*.name == '' runs-on: ubuntu-latest steps: - uses: kentaro-m/[email protected] with: repo-token: "${{ secrets.GITHUB_TOKEN }}"
from auto-assign-action.
@PrinsFrank interesting, though doesn't seem to work for me. When I submit a PR, it just skips the action all together initially
from auto-assign-action.
@PrinsFrank That does not work. I did several iterations around it, and github actions will not let you test an empty array in that fashion or in any way I could think of. This is final configuration I ended up with before stopping:
name: 'Auto Assign'
on:
pull_request:
types: [opened, reopened]
jobs:
triage-assign-and-review:
if: contains(github.event.pull_request.requested_reviewers.*.login, '') && contains(github.event.pull_request.requested_teams.*.slug, '')
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
from auto-assign-action.
I thought a good idea which checking exist assignees or reviewers before adding its to PR.
This sounds good to me. To be clear, it should precisely be checking that the "number" of reviewers/assignees match what's specified in the config file.
I'm having the same general problem, but specifically one no one has mentioned: I open a PR, the right number of (random) reviewers get added (good). Any subsequent commit pushed to that PR will trigger more reviewers being assigned (bad).
from auto-assign-action.
My team encountered this problem. Is there any up-to-date solution?
@carlisia is the problem fixed on the GitHub App version? Should we switch to using it?
from auto-assign-action.
Hey @idonov8 I haven't tested or used this action in a long while, sorry I cannot be of help.
from auto-assign-action.
Related Issues (20)
- Keep getting Bad_Credentials error HOT 6
- Group of reviewers per label
- `[warning]Resource not accessible by integration` when running against PRs HOT 3
- Allow overriding the default draft skip behavior
- BUG HOT 1
- Assign project? HOT 3
- fails to add reviewer & assignee
- Explain the purpose of review groups HOT 1
- Assignees enhancement - Option to include Author (ie. owner) in conjunction with other auto-assignees.
- Reviewer re-request review after approved
- Does not add a reviewer HOT 3
- Auto-assign the original author + another member
- Allow assignment on pull_request_review action
- Non English Letter skipKeywords Fail
- Why a separate yaml file for configuration?
- Action Required: Fix Renovate Configuration
- Dependency Dashboard
- [support] Error: Input required and not supplied: repo-token HOT 3
- Node.js 12 actions are deprecated HOT 2
- Can we upgrade node to v16? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from auto-assign-action.