| 1 | name: Suggest Diffinery to awesome lists |
| 2 | |
| 3 | # Opens one pull request per curated list in scripts/awesome-lists/lists.mjs, as the account |
| 4 | # that owns OUTREACH_TOKEN, so they show Codician rather than a person. Lists where Diffinery is |
| 5 | # already listed or suggested are left alone, and lists whose rules don't allow it yet are |
| 6 | # skipped until their day, so running it again is safe. Run it by hand from the Actions tab. |
| 7 | # |
| 8 | # OUTREACH_TOKEN: a classic personal access token of the Codician GitHub account with only the |
| 9 | # public_repo scope (fine-grained tokens can't open pull requests on other people's repositories). |
| 10 | on: |
| 11 | workflow_dispatch: |
| 12 | inputs: |
| 13 | lists: |
| 14 | description: "List ids, comma-separated, or 'due' for every list whose rules allow it today" |
| 15 | type: string |
| 16 | default: due |
| 17 | dry_run: |
| 18 | description: Only report what would change |
| 19 | type: boolean |
| 20 | default: false |
| 21 | |
| 22 | permissions: |
| 23 | contents: read |
| 24 | |
| 25 | jobs: |
| 26 | suggest: |
| 27 | name: Open the list pull requests |
| 28 | if: ${{ github.server_url != 'https://github.com' && github.repository == 'codician/diffinery' }} |
| 29 | runs-on: ubuntu-latest |
| 30 | environment: github-mirror |
| 31 | timeout-minutes: 10 |
| 32 | steps: |
| 33 | - uses: actions/checkout@v4 |
| 34 | - run: node scripts/awesome-lists.mjs --lists="$LISTS" ${{ inputs.dry_run && '--dry-run' || '' }} |
| 35 | env: |
| 36 | LISTS: ${{ inputs.lists }} |
| 37 | OUTREACH_TOKEN: ${{ secrets.OUTREACH_TOKEN }} |