Skip to content

Update wallet-data.ts - tokenpocket #21212

Update wallet-data.ts - tokenpocket

Update wallet-data.ts - tokenpocket #21212

Workflow file for this run

name: Labeler
on:
- pull_request_target
jobs:
label:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Refine labels
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
try {
const { owner, repo, number: pull_number } = context.issue;
const { data: files } = await github.pulls.listFiles({ owner, repo, pull_number });
const allInEn = files.every(file => file.filename.startsWith('src/intl/en/'));
const allInTranslations = files.every(file => file.filename.startsWith('public/content/translations/'));
if (allInEn) {
await github.issues.removeLabel({ owner, repo, issue_number: pull_number, name: 'translation 🌍' });
}
if (allInTranslations) {
await github.issues.removeLabel({ owner, repo, issue_number: pull_number, name: 'content 🖋️' });
}
} catch (error) {
console.warn("Problem occurred refining labels")
}