Skip to content

Commit

Permalink
action
Browse files Browse the repository at this point in the history
  • Loading branch information
codeallthethingz committed Jan 8, 2025
1 parent 62ca765 commit 4282f77
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/actions/pin_comment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,25 @@ inputs:
comment_id:
description: "Unique identifier for this pinned comment"
required: true
working_directory:
description: "Path to the repository working directory"
required: true

runs:
using: "composite"
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Pin comment
shell: bash
env:
GH_TOKEN: ${{ inputs.token }}
MESSAGE: ${{ inputs.message }}
ISSUE_NUMBER: ${{ inputs.issue_number }}
COMMENT_ID: ${{ inputs.comment_id }}
WORKING_DIRECTORY: ${{ inputs.working_directory }}
run: |
# Change to working directory
cd "${WORKING_DIRECTORY}"
# Create comment with hidden marker and ID
COMMENT="<!--pin-comment-marker-${COMMENT_ID}-->
${MESSAGE}"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docs-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
comment_id: docs-preview
working_directory: tbp.monty
message: |
📚 **Documentation Preview**
Expand Down Expand Up @@ -90,6 +91,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
comment_id: docs-preview
working_directory: tbp.monty
message: |
📚 **Documentation Preview**
Expand All @@ -104,6 +106,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
issue_number: ${{ github.event.pull_request.number }}
comment_id: docs-preview
working_directory: tbp.monty
message: |
📚 **Documentation Preview**
Expand Down

0 comments on commit 4282f77

Please sign in to comment.