Skip to content

Commit 044c4fc

Browse files
authored
Update tox.yml
1 parent b927dc8 commit 044c4fc

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

.github/workflows/tox.yml

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ jobs:
115115
if: always()
116116
permissions:
117117
pull-requests: write # allow codenotify to comment on pull-request
118-
deployments: write # allow for cleanup
119118

120119
needs:
121120
- build
@@ -137,32 +136,3 @@ jobs:
137136
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138137
# https://github.com/sourcegraph/codenotify/issues/19
139138
continue-on-error: true
140-
141-
- name: Delete Previous deployments
142-
uses: actions/github-script@v6
143-
if: always()
144-
env:
145-
GITHUB_SHA_HEAD: ${{ github.event.pull_request.head.sha }}
146-
with:
147-
script: |
148-
const { GITHUB_SHA_HEAD } = process.env
149-
const deployments = await github.rest.repos.listDeployments({
150-
owner: context.repo.owner,
151-
repo: context.repo.repo,
152-
sha: GITHUB_SHA_HEAD
153-
});
154-
await Promise.all(
155-
deployments.data.map(async (deployment) => {
156-
await github.rest.repos.createDeploymentStatus({
157-
owner: context.repo.owner,
158-
repo: context.repo.repo,
159-
deployment_id: deployment.id,
160-
state: 'inactive'
161-
});
162-
return github.rest.repos.deleteDeployment({
163-
owner: context.repo.owner,
164-
repo: context.repo.repo,
165-
deployment_id: deployment.id
166-
});
167-
})
168-
);

0 commit comments

Comments
 (0)