Skip to content

REC-136: Efectores y cuil paciente #30

REC-136: Efectores y cuil paciente

REC-136: Efectores y cuil paciente #30

name: PR conflict label
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
conflicts:
runs-on: ubuntu-latest
steps:
- name: Check conflicts
uses: actions/github-script@v7
with:
script: |
const pr = context.payload.pull_request;
const { owner, repo } = context.repo;
const issue_number = pr.number;
if (pr.mergeable_state === 'dirty') {
await github.rest.issues.addLabels({
owner,
repo,
issue_number,
labels: ['Conflictos']
});
} else {
try {
await github.rest.issues.removeLabel({
owner,
repo,
issue_number,
name: 'Conflictos'
});
} catch (e) {
// label no existía
}
}