Skip to content

Commit f491830

Browse files
authored
Update validate-structure.yml
1 parent bafc9fa commit f491830

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

.github/workflows/validate-structure.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,7 @@ jobs:
4545
continue-on-error: true
4646
run: node "$RUNNER_TEMP/validate-structure.js" origin/${{ github.event.pull_request.base.ref }}...HEAD
4747

48-
- name: Close pull request on failure
49-
if: ${{ steps.validate.outcome == 'failure' }}
50-
uses: actions/github-script@v6
51-
with:
52-
github-token: ${{ github.token }}
53-
script: |
54-
const pullNumber = context.payload.pull_request.number;
55-
const owner = context.repo.owner;
56-
const repo = context.repo.repo;
57-
58-
await github.rest.issues.createComment({
59-
owner,
60-
repo,
61-
issue_number: pullNumber,
62-
body: `Thank you for your contribution. However, it doesn't comply with our contributing guidelines. As a reminder, the general requirements (as outlined in the [CONTRIBUTING.md file](https://github.com/ServiceNowDevProgram/code-snippets/blob/main/CONTRIBUTING.md)) are the following: follow the folder+subfolder+snippetfolder guidelines and include a README.md file explaining what the code snippet does. Review your contribution against the guidelines and make the necessary adjustments. Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one.`.trim()
63-
});
64-
65-
await github.rest.pulls.update({
66-
owner,
67-
repo,
68-
pull_number: pullNumber,
69-
state: 'closed'
70-
});
48+
7149

7250
- name: Mark job as failed if validation failed
7351
if: ${{ steps.validate.outcome == 'failure' }}

0 commit comments

Comments
 (0)