Skip to content

Commit

Permalink
Iteration 5 - notify to slack.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoavo-codium committed Nov 8, 2024
1 parent 3fd35c9 commit 19999f7
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,6 @@ jobs:
with:
github-token: ${{ secrets.CODIUM_PROXY_TOKEN }}
script: |
try {
// First verify we can access the repo
console.log('Checking repository access...');
const repo = await github.rest.repos.get({
owner: 'Codium-ai',
repo: 'codium-proxy'
});
console.log('Repository found:', repo.data.full_name);
// Then verify we can see the branch
console.log('Checking branch access...');
const branch = await github.rest.repos.getBranch({
owner: 'Codium-ai',
repo: 'codium-proxy',
branch: 'update-docs-context-branch'
});
console.log('Branch found:', branch.data.name);
// If we get here, try to create the PR
console.log('Creating pull request...');
const pullRequest = await github.rest.pulls.create({
Expand All @@ -91,3 +73,12 @@ jobs:
});
core.setFailed(error.message);
}
- name: Send Slack Notification
if: success()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
run: |
curl -X POST -H 'Content-type: application/json' \
--data "{\"text\":\"A new pull request has been created: ${{ steps.create_pr.outputs.pull_request_url }}\"}" \
$SLACK_WEBHOOK_URL

0 comments on commit 19999f7

Please sign in to comment.