Feature requerst: Add data visualization in Data Viewer #6750
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: Assign DS issue to someone | |
on: | |
issues: | |
types: [opened] | |
permissions: | |
issues: write | |
jobs: | |
assignIssue: | |
name: Assign Issue to Someone | |
runs-on: ubuntu-latest | |
if: github.repository == 'microsoft/vscode-jupyter' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Created internally | |
id: internal | |
env: | |
ISSUE_OWNER: ${{github.event.issue.user.login}} | |
run: | | |
echo ::set-output name=result::$(node -p -e "['amunger', 'DonJayamanne', 'minsa110', 'rebornix', 'roblourens', 'kieferrm'].filter(item => process.env.ISSUE_OWNER.toLowerCase() === item.toLowerCase()).length > 0 ? 1 : 0") | |
shell: bash | |
- name: Should we proceed | |
id: proceed | |
env: | |
ISSUE_LABELS: ${{toJson(github.event.issue.labels)}} | |
ISSUE_ASSIGNEES: ${{toJson(github.event.issue.assignees)}} | |
ISSUE_IS_INTERNAL: ${{steps.internal.outputs.result}} | |
run: | | |
echo ::set-output name=result::$(node -p -e "process.env.ISSUE_IS_INTERNAL === '0' && JSON.parse(process.env.ISSUE_ASSIGNEES).length === 0 ? 1 : 0") | |
shell: bash | |
- name: Day of week | |
if: steps.proceed.outputs.result == 1 | |
id: day | |
run: | | |
echo ::set-output name=number::$(node -p -e "new Date().getDay()") | |
shell: bash | |
- name: Hour of day | |
if: steps.proceed.outputs.result == 1 | |
id: hour | |
run: | | |
echo ::set-output name=hour::$(node -p -e "(new Date().getUTCHours() - 7)%24") | |
shell: bash | |
- name: Week Number | |
if: steps.proceed.outputs.result == 1 | |
id: week | |
run: | | |
echo ::set-output name=odd::$(node .github/workflows/week.js) | |
shell: bash | |
- name: Print day and week | |
if: steps.proceed.outputs.result == 1 | |
run: | | |
echo ${{steps.day.outputs.number}} | |
echo ${{steps.week.outputs.odd}} | |
echo ${{steps.hour.outputs.hour}} | |
shell: bash | |
- name: Saturday (Don) | |
if: steps.proceed.outputs.result == 1 && steps.day.outputs.number == 6 | |
uses: actions/github-script@v6.4.1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.addAssignees({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
assignees: ['DonJayamanne'] | |
}) | |
- name: Sunday (Don) | |
if: steps.proceed.outputs.result == 1 && steps.day.outputs.number == 0 | |
uses: actions/github-script@v6.4.1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.addAssignees({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
assignees: ['DonJayamanne'] | |
}) | |
- name: Monday (Aaron) | |
if: steps.proceed.outputs.result == 1 && steps.day.outputs.number == 1 && steps.hour.outputs.hour < 16 | |
uses: actions/github-script@v6.4.1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.addAssignees({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
assignees: ['amunger'] | |
}) | |
- name: Tuesday (Rob) | |
if: steps.proceed.outputs.result == 1 && (steps.day.outputs.number == 1 && steps.hour.outputs.hour >= 16) || (steps.day.outputs.number == 2 && steps.hour.outputs.hour < 16) | |
uses: actions/github-script@v6.4.1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.addAssignees({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
assignees: ['roblourens '] | |
}) | |
- name: Wednesday (Don) | |
if: steps.proceed.outputs.result == 1 && (steps.day.outputs.number == 2 && steps.hour.outputs.hour >= 16) || (steps.day.outputs.number == 3 && steps.hour.outputs.hour < 16) | |
uses: actions/github-script@v6.4.1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.addAssignees({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
assignees: ['DonJayamanne'] | |
}) | |
- name: Thursday (Peng) | |
if: steps.proceed.outputs.result == 1 && (steps.day.outputs.number == 3 && steps.hour.outputs.hour >= 16) || (steps.day.outputs.number == 4 && steps.hour.outputs.hour < 16) | |
uses: actions/github-script@v6.4.1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.addAssignees({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
assignees: ['rebornix'] | |
}) | |
- name: Friday (Aaron) | |
if: steps.proceed.outputs.result == 1 && (steps.day.outputs.number == 4 && steps.hour.outputs.hour >= 16) || (steps.day.outputs.number == 5) | |
uses: actions/github-script@v6.4.1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.rest.issues.addAssignees({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
assignees: ['amunger'] | |
}) |