diff --git a/.github/workflows/intake.yml b/.github/workflows/intake.yml index 18a5d5c..2018239 100644 --- a/.github/workflows/intake.yml +++ b/.github/workflows/intake.yml @@ -3,46 +3,50 @@ # When WalletConnect Org members create issues they # are automatically "accepted". # Else they need to manually receive that label during intake. -name: intake +# +# Currently, this workflow is not used. -on: - issues: - types: [opened, labeled] - pull_request: - types: [opened, labeled] - -jobs: - add-to-project: - name: Add issue to board - if: github.event.action == 'labeled' && github.event.label.name == 'accepted' - runs-on: ubuntu-latest - steps: - - uses: actions/add-to-project@v0.1.0 - with: - project-url: https://github.com/orgs/WalletConnect/projects/9 - github-token: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }} - labeled: accepted - label-operator: OR - auto-promote: - name: auto-promote - if: github.event.action == 'opened' - runs-on: ubuntu-latest - steps: - - name: Check Core Team membership - uses: tspascoal/get-user-teams-membership@v1 - id: is-core-team - with: - username: ${{ github.event_name != 'pull_request' && github.event.issue.user.login || github.event.sender.login }} - team: "Core Team" - GITHUB_TOKEN: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }} - - name: Print result - env: - CREATOR: ${{ github.event_name != 'pull_request' && github.event.issue.user.login || github.event.sender.login }} - IS_TEAM_MEMBER: ${{ steps.is-core-team.outputs.isTeamMember }} - run: echo "$CREATOR (Core Team Member $IS_TEAM_MEMBER) created this issue/PR" - - name: Label issues - if: ${{ steps.is-core-team.outputs.isTeamMember == 'true' }} - uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 - with: - add-labels: "accepted" - repo-token: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }} +#name: Intake +# +#on: +# issues: +# types: [opened, labeled] +# pull_request: +# types: [opened, labeled] +# +#jobs: +# add-to-project: +# name: Add issue to board +# if: github.event.action == 'labeled' && github.event.label.name == 'accepted' +# runs-on: ubuntu-latest +# steps: +# - uses: actions/add-to-project@v0.1.0 +# with: +# project-url: https://github.com/orgs/WalletConnect/projects/9 +# github-token: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }} +# labeled: accepted +# label-operator: OR +# +# auto-promote: +# name: auto-promote +# if: github.event.action == 'opened' +# runs-on: ubuntu-latest +# steps: +# - name: Check Core Team membership +# uses: tspascoal/get-user-teams-membership@v1 +# id: is-core-team +# with: +# username: ${{ github.event_name != 'pull_request' && github.event.issue.user.login || github.event.sender.login }} +# team: "Core Team" +# GITHUB_TOKEN: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }} +# - name: Print result +# env: +# CREATOR: ${{ github.event_name != 'pull_request' && github.event.issue.user.login || github.event.sender.login }} +# IS_TEAM_MEMBER: ${{ steps.is-core-team.outputs.isTeamMember }} +# run: echo "$CREATOR (Core Team Member $IS_TEAM_MEMBER) created this issue/PR" +# - name: Label issues +# if: ${{ steps.is-core-team.outputs.isTeamMember == 'true' }} +# uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90 +# with: +# add-labels: "accepted" +# repo-token: ${{ secrets.ASSIGN_TO_PROJECT_GITHUB_TOKEN }} diff --git a/.github/workflows/issues.yaml b/.github/workflows/issues.yaml new file mode 100644 index 0000000..20deac9 --- /dev/null +++ b/.github/workflows/issues.yaml @@ -0,0 +1,64 @@ +name: Project Workflows + +on: + issues: + types: + - reopened + - closed + pull_request_target: + types: + - opened + - edited + - reopened + - synchronize + +env: + project_id: 20 + new: 🆕 New + backlog: 🗃 Backlog + prioritized: 🔖 Prioritized + in_progress: 🏗 In progress + blocked: 🛑 Blocked + in_review: 👀 In review + done: ✅ Done + +jobs: + + issue_reopened: + name: Issue Reopened + runs-on: ubuntu-latest + if: github.event_name == 'issues' && github.event.action == 'reopened' + steps: + - name: Move issue to ${{ env.prioritized }} + uses: leonsteinhaeuser/project-beta-automations@v2.1.0 + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} + organization: WalletConnect + project_id: ${{ env.project_id }} + resource_node_id: ${{ github.event.issue.node_id }} + status_value: ${{ env.prioritized }} + + issue_closed: + name: issue_closed + runs-on: ubuntu-latest + if: github.event_name == 'issues' && github.event.action == 'closed' + steps: + - name: Moved issue to ${{ env.done }} + uses: leonsteinhaeuser/project-beta-automations@v2.1.0 + with: + gh_token: ${{ secrets.GITHUB_TOKEN }} + organization: WalletConnect + project_id: ${{ env.project_id }} + resource_node_id: ${{ github.event.issue.node_id }} + status_value: ${{ env.done }} + + check_pull_requests: + name: Check linked issues + runs-on: ubuntu-latest + if: github.event_name == 'pull_request_target' + permissions: + issues: read + pull-requests: write + steps: + - uses: nearform-actions/github-action-check-linked-issues@v1 + id: check-linked-issues