Skip to content

Commit

Permalink
Reduce reliance on PAT
Browse files Browse the repository at this point in the history
codycooperross committed Jul 31, 2024

Verified

This commit was signed with the committer’s verified signature.
Sebobo Sebastian Helzle
1 parent d341514 commit a10d9c9
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/update_linked_front_conversation.py
Original file line number Diff line number Diff line change
@@ -43,7 +43,7 @@ def get_discussion_number_from_issue_body(issue_body):
return None

def add_comment_to_conversation(conversation_id):
comment = f"""**🎀 Product Suggestion Posted 🎀**\n\n#{DISCUSSION_NUMBER} "{DISCUSSION_TITLE}\"\n_{GITHUB_USER}_\n\n{DISCUSSION_URL}"""
comment = f"""**Product Suggestion Posted**\n\n#{DISCUSSION_NUMBER} "{DISCUSSION_TITLE}\"\n_{GITHUB_USER}_\n\n{DISCUSSION_URL}"""
api_url = FRONT_API_URL + "conversations/" + conversation_id + "/comments"

response = requests.post(api_url, json={"body": comment, "author_id": FRONT_USER}, headers={"Authorization": "Bearer " + FRONT_TOKEN})
2 changes: 1 addition & 1 deletion .github/workflows/new_discussion.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
env:
DISCUSSION_BODY: ${{ github.event.discussion.body }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DISCUSSION_URL: ${{ github.event.discussion.html_url }}
DISCUSSION_TITLE: ${{ github.event.discussion.title }}
DISCUSSION_NUMBER: ${{ github.event.discussion.number }}
6 changes: 2 additions & 4 deletions .github/workflows/new_issue.yml
Original file line number Diff line number Diff line change
@@ -27,17 +27,15 @@ jobs:
TRANSFERRED_LABEL: ${{ vars.TRANSFERRED_LABEL }}
DEST_REPO: ${{ vars.DEST_REPO }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python .github/scripts/update_issue.py
transfer_issue:
if: ${{ ! contains(github.event.issue.labels.*.name, vars.KEEP_LABEL ) }}
needs: update-issue
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- run: gh issue transfer "$ISSUE" datacite/product-suggestions-triage
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
ISSUE: ${{ github.event.issue.html_url }}

0 comments on commit a10d9c9

Please sign in to comment.