Skip to content

Commit

Permalink
Merge branch 'main' into discussions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherwin-14 committed Jan 4, 2025
2 parents c4c5f81 + 179f28b commit c73faab
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/discussions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,22 @@ on:
jobs:
create-discussion-threads:
runs-on: ubuntu-latest
permissions:
discussions: write
contents: read

steps:

- name: temp1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api graphql --field query="mutation ($input: CreateDiscussionInput!) { createDiscussion(input: $input) { discussion { id } } }" --field variables='{"input": {"body": "The body of the new discussion", "title": "The title of the new discussion", "repositoryId": ${{secrets.REPO_ID}}, "categoryId": ${{secrets.CAT_ID}}, "clientMutationId": "my-unique-client-id"}}'
- name: Create a new GitHub Discussion
id: create-discussion
uses: abirismyname/[email protected]
uses: abirismyname/[email protected]

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -29,4 +40,4 @@ jobs:
echo discussion-id: ${{steps.create-discussion.outputs.discussion-id}}
echo discussion-url: ${{steps.create-discussion.outputs.discussion-url}}
else
echo "Discussion not created"
echo "Discussion not created"

0 comments on commit c73faab

Please sign in to comment.