[Dynamic Page]: tab focus bypasses tab #836
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Reopen Issue on Comment | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
reopen-issue: | |
if: github.event.issue.state == 'closed' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check and Compare Timestamps | |
id: check | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const issue = await github.rest.issues.get({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.payload.issue.number | |
}); | |
const closedAt = new Date(issue.data.closed_at).getTime(); | |
const commentAt = new Date(context.payload.comment.created_at).getTime(); | |
const commenter = context.payload.comment.user.login; | |
// Allowed bots | |
const isSystemUser = ['ui5-webcomponents-bot', 'github-actions[bot]'].includes(commenter); | |
core.setOutput('shouldReopen', !isSystemUser && commentAt > closedAt); | |
- name: Reopen Issue | |
if: steps.check.outputs.shouldReopen == 'true' | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
github.rest.issues.update({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.payload.issue.number, | |
state: 'open' | |
}) |