From d29af06a80183508ba52267d77d401f7c3c5a83e Mon Sep 17 00:00:00 2001 From: Jackson Hoffart Date: Mon, 19 Feb 2024 13:49:10 +0100 Subject: [PATCH] Use GH-to-ADO instead of GH project (#473) --- .../add-prs-and-issues-to-project.yml | 30 ------------------- .github/workflows/issues.yml | 26 ++++++++++++++++ 2 files changed, 26 insertions(+), 30 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 2cc5f31d..00000000 --- a/.github/workflows/add-prs-and-issues-to-project.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Add new issues and PRs to GH Projects - -on: - issues: - types: - - opened - - transferred - pull_request: - branches: [main] - types: - - opened - -jobs: - add-to-r2dii-proj: - name: Add issue/ PR to r2dii suite 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/11 - github-token: ${{ secrets.PAT_ADD_ISSUES_TO_PROJECT }} - - add-to-maintainer-proj: - 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 00000000..dff45c19 --- /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 }}