LNK2001 About Aws::Http::CONTENT_TYPE_HEADER and Aws::Http::CONTENT TYPE HEADER #17
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
# Apply potential regression label on issues | |
name: issue-regression-label | |
on: | |
issues: | |
types: [opened, edited] | |
workflow_dispatch: # Allows manual triggering of the workflow | |
jobs: | |
add-regression-label: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
- name: Fetch template body | |
id: check_regression | |
uses: actions/github-script@v7 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TEMPLATE_BODY: ${{ github.event.issue.body }} | |
with: | |
script: | | |
const regressionPattern = /\[x\] Select this option if this issue appears to be a regression\./i; | |
const template = `${process.env.TEMPLATE_BODY}` | |
const match = regressionPattern.test(template); | |
core.setOutput('is_regression', match); | |
- name: Add label on regression | |
if: steps.check_regression.outputs.is_regression == 'true' | |
id: add_label | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
await github.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
labels: ['potential-regression'], | |
}); | |
- name: Remove label on regression | |
if: steps.check_regression.outputs.is_regression == 'false' | |
id: remove_label | |
uses: actions/github-script@v7 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
try { | |
await github.rest.issues.removeLabel({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
name: 'potential-regression', | |
}); | |
} catch (error) { | |
console.log('Label does not exist or cannot be removed:', error.message); | |
} | |