The commit upgrades the 'github-script' action to version 7 and modifies the method for creating issue comments. This change accommodates updates in the 'github-script' action and aligns with newer API usage for creating issue comments.
31 lines
840 B
YAML
31 lines
840 B
YAML
name: Append Footer to Issue with Bounty Label
|
|
|
|
on:
|
|
issues:
|
|
types: [labeled]
|
|
|
|
jobs:
|
|
append-footer:
|
|
if: github.event.label.name == 'bounty'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Read Footer Content
|
|
id: footer
|
|
run: echo "::set-output name=content::$(cat docs/bounty-footer.md)"
|
|
|
|
- name: Append Footer to Issue
|
|
uses: actions/github-script@v7
|
|
with:
|
|
github-token: ${{secrets.GITHUB_TOKEN}}
|
|
script: |
|
|
const issueComment = `${{ steps.footer.outputs.content }}`;
|
|
github.rest.issues.createComment({
|
|
issue_number: context.issue.number,
|
|
owner: context.repo.owner,
|
|
repo: context.repo.name,
|
|
body: issueComment
|
|
});
|