Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

PR dependency management

Actions
Manage dependency between PR using the Depends-On keyword
0.4.0
Star (13)

depends-on-action

GitHub action to install dependent Pull Requests and configure them to be used by later steps.

Overview

This action allows you to install Pull Request dependencies when the workflow action is triggered.

The action is extracting all the Pull Requests that are declared in the description of the Pull Request with Depends-On: <PR url> syntax.

It then injects the needed changes in the code to use the other Pull Requests.

Go lang

For a go lang change, the action is adding replace directives for the dependencies inside the go.mod file. It is not running go mod tidy and it is expecting it to be run by your build automation in a later stage.

Python

For a Python change, the action is replacing entries in requirements.txt with a -e <local change>.

Enabling the action

Sample Configuration

Defining Github Actions requires that you create a directory .github/workflows inside your repository. Inside this directory you create files which are processed when various events occur.

The simplest example of using this action would be to create the file .github/workflows/pull_request.yml with the following contents:

---
name: Pull Request
on:
  pull_request:
    types: [opened, synchronize, reopened]
jobs:
  validate-tests:
    runs-on: ubuntu-latest
    steps:

      - name: Checkout code
        uses: actions/checkout@master

      - name: Extract dependent Pull Requests
        uses: depends-on/depends-on-action@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

      # <your usual actions here>

  check-all-dependencies-are-merged:
    runs-on: ubuntu-latest
    steps:

      - name: Checkout code
        uses: actions/checkout@master

      - name: Check all dependent Pull Requests are merged
        uses: depends-on/depends-on-action@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          check-unmerged-pr: true
...

Roadmap

PR dependency management is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Manage dependency between PR using the Depends-On keyword
0.4.0

PR dependency management is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.