Skip to content

Commit

Permalink
- removes dependency on bot configuration for issues auto-add
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed May 13, 2024
1 parent 72e70ba commit babfd0d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/project-auto-add.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,16 @@ on:
branches:
- "main"

permissions:
contents: read
issues: write
pull-requests: write

jobs:
track_issue:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
with:
app_id: ${{ secrets.GRAPHBOT_APP_ID }}
private_key: ${{ secrets.GRAPHBOT_APP_PEM }}

- name: Check if issue has language specified
env:
ISSUE_BODY: ${{github.event.issue.body}}
Expand All @@ -40,7 +38,6 @@ jobs:
- name: Get project data
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
ORGANIZATION: microsoft
PROJECT_NUMBER: 220
run: |
Expand Down Expand Up @@ -72,7 +69,6 @@ jobs:
- name: Add Issue or PR to project
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
ISSUE_ID: ${{ github.event_name == 'issues' && github.event.issue.node_id || github.event.pull_request.node_id }}
run: |
item_id="$( gh api graphql -f query='
Expand All @@ -87,8 +83,6 @@ jobs:
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
- name: Set Language
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
gh api graphql -f query='
mutation (
Expand Down

0 comments on commit babfd0d

Please sign in to comment.