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

MINOR Auto-approve Pull Request Reviewed with ci-approved label #19098

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ There are two files related to this workflow:

* [pr-labeled.yml](pr-labeled.yml) approves a pending approval for PRs that have
been labeled with `ci-approved`
* [ci-requested.yml](ci-requested.yml) approves future workflow requests automatically
* [workflow-requested.yml](workflow-requested.yml) approves future workflow requests automatically
if the PR has the `ci-approved` label

_The pr-labeled.yml workflow includes pull_request_target!_
Expand All @@ -119,6 +119,9 @@ or body edited. This workflow simply captures the PR number into a text file
using the saved text file. This workflow runs the linter script that checks the
structure of the PR

Note that the pr-reviewed.yml workflow uses the `ci-approved` mechanism described
above.

### Stale PRs

This one is straightforward. Using the "actions/stale" GitHub Action, we automatically
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: CI Requested
name: Workflow Requested

on:
workflow_run:
workflows: [CI]
workflows: [CI, Pull Request Reviewed]
types:
- requested

run-name: CI Requested for ${{ github.event.workflow_run.display_title}}
run-name: Workflow Requested for ${{ github.event.workflow_run.display_title}}

jobs:
check-pr-labels:
# Even though job conditionals are difficult to debug, this will reduce the number of unnecessary runs
if: |
github.event_name == 'workflow_run' &&
github.event.workflow_run.event == 'pull_request' &&
(github.event.workflow_run.event == 'pull_request' || github.event.workflow_run.event == 'pull_request_review') &&
github.event.workflow_run.status == 'completed' &&
github.event.workflow_run.conclusion == 'action_required'
runs-on: ubuntu-latest
Expand Down