build(deps): bump org.mockito:mockito-core from 5.14.2 to 5.15.2 in /android in the dependencies group across 1 directory #86
This file contains 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: "Issue Comment" | |
on: | |
issue_comment: | |
types: [ created ] | |
jobs: | |
remove-question-flag: | |
name: "Remove `question` Label" | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
pull-requests: write | |
steps: | |
- name: "Check issue labels" | |
id: check_labels | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const { data: issue } = await github.rest.issues.get({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number | |
}); | |
const isStale = issue.labels.some(label => label.name === 'stale'); | |
console.log("isStale: " + isStale); | |
if (isStale) return false; | |
const { data: events } = await github.rest.issues.listEvents({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number | |
}); | |
const labelAddedEvent = events.findLast(event => event.event === 'labeled' && event.label.name === 'question'); | |
if (!labelAddedEvent) return false; | |
const labelAddedDate = new Date(labelAddedEvent.created_at); | |
const now = new Date(); | |
const secondsSinceLabelAdded = (now - labelAddedDate) / 1000; | |
console.log(secondsSinceLabelAdded + "s") | |
return secondsSinceLabelAdded > 30; | |
# only remove the label if the issue is not stale, this prevents that this | |
# action removes the label when the automatic reminder message gets sent. | |
- name: "Remove `question` label if exists" | |
if: steps.check_labels.outputs.result == 'true' | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
await github.rest.issues.removeLabel({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
name: ["question"] | |
}); |