Skip to content

Commit

Permalink
update ghascript usage
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Mar 28, 2024
1 parent 6cf14bf commit 19700d4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/manual-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ jobs:
echo "STUB ISSUE NUMBER: ${{steps.test_action.outputs.stub_issue_number}}"
- name: Comment on transferred issue
if: steps.test_action.outputs.new_issue_number != ''
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
debug: true
github-token: ${{ secrets.TRANSFER_ISSUE_TOKEN }}
script: |
try {
await github.rest.issues.createComment({
Expand All @@ -51,9 +52,10 @@ jobs:
}
- name: Close transferred issue
if: steps.test_action.outputs.new_issue_number != ''
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
debug: true
github-token: ${{ secrets.TRANSFER_ISSUE_TOKEN }}
script: |
try {
await github.rest.issues.update({
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pr-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ jobs:
echo "NEW ISSUE URL: ${{steps.test_action.outputs.new_issue_url}}"
echo "STUB ISSUE NUMBER: ${{steps.test_action.outputs.stub_issue_number}}"
- name: Comment on test issue
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
debug: true
github-token: ${{ secrets.TRANSFER_ISSUE_TOKEN }}
script: |
try {
await github.rest.issues.createComment({
Expand All @@ -66,9 +67,10 @@ jobs:
core.setFailed(error.message);
}
- name: Close test issue for cleanliness purposes
uses: actions/github-script@v5
uses: actions/github-script@v7
with:
debug: true
github-token: ${{ secrets.TRANSFER_ISSUE_TOKEN }}
script: |
try {
await github.rest.issues.update({
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Input | Description | Required | Default |

### Input Notes

* The `GITHUB_TOKEN` secret provided by GitHub Actions will not work when transferring issues to another repo. You will get the error `Resource not accessible by integration` if you try and use it. Create a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with the repo check box and all its sub items checked.
* The `GITHUB_TOKEN` secret provided by GitHub Actions will not work when transferring issues to another repo. You will get the error `Resource not accessible by integration` if you try and use it. Create a [Personal Access Token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with the `repo` check box and all its sub items checked.

## Outputs

Expand Down

0 comments on commit 19700d4

Please sign in to comment.