-
Notifications
You must be signed in to change notification settings - Fork 684
CI - Merge hooks #4224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
CI - Merge hooks #4224
Changes from all commits
62054cd
e3014ed
3722020
59daa34
3284ae5
303b411
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |||||||||||||||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||||||||||||||||
| sudo apt-get install -y gh | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # TODO: Perhaps we should merge this into the public-pr-merge.yml workflow, now that that exists. | ||||||||||||||||||||||||||||||||
| - name: Send Discord notification | ||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||
| DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | ||||||||||||||||||||||||||||||||
|
|
@@ -69,3 +70,22 @@ | |||||||||||||||||||||||||||||||
| # Use `jq` to construct the json data blob in the format required by the webhook. | ||||||||||||||||||||||||||||||||
| data="$(jq --null-input --arg msg "$message" '.content=$msg')" | ||||||||||||||||||||||||||||||||
| curl -X POST -H 'Content-Type: application/json' -d "$data" "${DISCORD_WEBHOOK_URL}" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| invokePrivate: | ||||||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
| if: github.event.pull_request.merged == true | ||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||
| - name: Dispatch private merge workflow | ||||||||||||||||||||||||||||||||
| uses: actions/github-script@v7 | ||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||
| github-token: ${{ secrets.SPACETIMEDB_PRIVATE_TOKEN }} | ||||||||||||||||||||||||||||||||
| script: | | ||||||||||||||||||||||||||||||||
| await github.rest.actions.createWorkflowDispatch({ | ||||||||||||||||||||||||||||||||
| owner: 'clockworklabs', | ||||||||||||||||||||||||||||||||
| repo: 'SpacetimeDBPrivate', | ||||||||||||||||||||||||||||||||
| workflow_id: 'public-pr-merge.yml', | ||||||||||||||||||||||||||||||||
| ref: 'bfops/smarter-internal-tests', | ||||||||||||||||||||||||||||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. before merging:
Suggested change
|
||||||||||||||||||||||||||||||||
| inputs: { | ||||||||||||||||||||||||||||||||
| public_pr_number: String(context.payload.pull_request.number), | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
|
Comment on lines
+75
to
+91
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 1 day ago In general, the fix is to add an explicit The single best change here is: add a workflow-level Concretely:
Suggested changeset
1
.github/workflows/discord-posts.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before merging: