From 2e543a5dda1a431384c4e42093c99f0d49c7a676 Mon Sep 17 00:00:00 2001 From: Jackson Hoffart Date: Mon, 19 Feb 2024 11:17:47 +0100 Subject: [PATCH] Use GH-to-ADO instead of GH projects Relates to RMI-PACTA/r2dii.data#339 --- .../add-prs-and-issues-to-project.yml | 21 --------------- .github/workflows/issues.yml | 26 +++++++++++++++++++ 2 files changed, 26 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/add-prs-and-issues-to-project.yml create mode 100644 .github/workflows/issues.yml diff --git a/.github/workflows/add-prs-and-issues-to-project.yml b/.github/workflows/add-prs-and-issues-to-project.yml deleted file mode 100644 index a30af47..0000000 --- a/.github/workflows/add-prs-and-issues-to-project.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Add new issues and PRs to @jdhoffa's Maintenance GH Project - -on: - issues: - types: - - opened - - transferred - pull_request: - branches: [main] - types: - - opened - -jobs: - add-to-project: - name: Add issue/ PR to @jdhoffa's maintenance GH project - runs-on: ubuntu-latest - steps: - - uses: actions/add-to-project@v0.5.0 - with: - project-url: https://github.com/orgs/RMI-PACTA/projects/12 - github-token: ${{ secrets.PAT_ADD_ISSUES_TO_PROJECT }} diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml new file mode 100644 index 0000000..dff45c1 --- /dev/null +++ b/.github/workflows/issues.yml @@ -0,0 +1,26 @@ +--- +# This example file will enable actions that trigger on created or modified GitHub issues. +# +# Note the @main in `uses:` on the last line. This will call the latest version of the workflow from the `main` branch in the RMI-PACTA/actions repo. +# You can also specify a tag from that repo, or a commit SHA to pin action versions. +on: + issues: + types: + [opened, edited, deleted, closed, reopened, labeled, unlabeled, assigned] + issue_comment: + types: [created, edited, deleted] + +name: GH issues + +permissions: + issues: write + pull-requests: write + +jobs: + issues: + name: Run issues workflows + uses: RMI-PACTA/actions/.github/workflows/issues.yml@main + with: + ado_area_path: "2DegreesInvesting\\Repositories that jdhoffa maintains" + secrets: + ADO_TOKEN: ${{ secrets.ADO_PERSONAL_ACCESS_TOKEN }}