diff --git a/.github/workflows/update-all-mergeables.yml b/.github/workflows/update-all-mergeables.yml new file mode 100644 index 0000000..7c84529 --- /dev/null +++ b/.github/workflows/update-all-mergeables.yml @@ -0,0 +1,26 @@ +name: Trigger Org-Wide Update + +on: + workflow_dispatch: + inputs: + mergeable-filter: + type: string + description: Mergeable id to update in the form of (feature/mergeable/...@RedEyeMods/.github). + default: ~ + required: true +jobs: + get-repositories: + name: Organization Repositories + runs-on: ubuntu-latest + outputs: + repositories: ${{ steps.org-grab.outputs.result }} + steps: + - name: Get Organization Data + id: org-grab + uses: actions/github-script@v7 + with: + github-token: ${{ secrets.ORG_PAT }} + script: | + console.log(github); + // const { data: repos } = github.rest.repos.listForOrg({ org: }); + // console.log(repos); \ No newline at end of file diff --git a/.github/workflows/update-mergeables.yml b/.github/workflows/update-mergeables.yml index 703a8f4..8654b71 100644 --- a/.github/workflows/update-mergeables.yml +++ b/.github/workflows/update-mergeables.yml @@ -8,6 +8,11 @@ on: description: The repository to merge into. default: "~" required: false + filter-mergeable: + type: string + description: Filter matrix entries to contain this text. + default: "~" + required: false jobs: input-sanitation: name: Input Sanitation @@ -51,7 +56,9 @@ jobs: fileContent = fs.readFileSync(filePath, 'utf8'); } - return fileContent.split('\n').filter(function(el) { return el != '' }); + const filter = ${{ inputs.filter-mergeable }}; + + return fileContent.split('\n').filter(function(el) { return el != '' && (filter == '~' || el.includes(${{ inputs.filter-mergeable }})) }); result-encoding: json update-matrix: