[Issue #419] Implement base methods and automated pagination handling #117
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Dependency mapping: Repo level" | |
| on: | |
| pull_request: # run on every PR | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * 1" # run weekly at midnight on Monday | |
| permissions: | |
| issues: write | |
| contents: write | |
| defaults: | |
| run: | |
| working-directory: ./.github/automations/deps_mapping | |
| jobs: | |
| sync: | |
| # Only run this job if the PR is from the same repository, | |
| # Or if the workflow is triggered manually or on a schedule | |
| if: | | |
| github.event.pull_request.head.repo.full_name == github.repository || | |
| github.event_name == 'workflow_dispatch' || | |
| github.event_name == 'schedule' | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_API_TOKEN: ${{ secrets.GH_PROJECT_ACCESS_TOKEN }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Run script | |
| run: | | |
| python run.py \ | |
| --org "${{ github.repository_owner }}" \ | |
| --repo "${{ github.event.repository.name }}" \ | |
| --project 17 \ | |
| --labels "co-planning" \ | |
| --issue-type "Epic" \ | |
| --scope "repo" | |
| - name: Commit changes to PR | |
| # Commit changes to PR when triggered by a PR, and don't skip CI | |
| # We don't want to skip CI because it will prevent the bump version workflow | |
| # from running on the main branch after the PR is merged | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| if git diff --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -am "docs: Update README with dependency diagram" | |
| git push | |
| fi | |
| - name: Commit changes to main | |
| # Commit changes to main with skip CI when triggered manually or on a schedule | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| if git diff --quiet; then | |
| echo "No changes to commit" | |
| else | |
| git commit -am "docs: Update README with dependency diagram [skip ci]" | |
| git push | |
| fi |