Skip to content
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

Create workflow for syncing Notion database and issues #642

Merged
merged 1 commit into from Jan 31, 2024

Conversation

blakehatch
Copy link
Contributor

@blakehatch blakehatch commented Jan 29, 2024

Description

Allows notion to sync with issues in our public repo.
Secrets that will have to be set by an admin:

  • NOTION_TOKEN
  • NOTION_DATABASE

Database will likely get changed to task board if we decide to make task tracking based out of the repo (Dump into backlog by default and can be moved by user) but will be separate for now.

Fixes #639

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist

  • PR is contained in a single commit, using git amend see some docs

This change is Reviewable

Copy link

vercel bot commented Jan 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nativelink-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2024 5:16pm

Copy link
Collaborator

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Cargo Dev / macos-13, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), macos-13, zig-cc ubuntu-20.04, zig-cc ubuntu-22.04 (waiting on @blakehatch)


.github/workflows/issues-notion-sync.yml line 22 at r1 (raw file):

jobs:
  notion_job:
    runs-on: ubuntu-latest

nit: Maybe use one of the alpine containers, they are much much smaller?

Copy link
Collaborator

@allada allada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Cargo Dev / macos-13, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), docker-compose-compiles-nativelink (22.04), macos-13, zig-cc ubuntu-20.04, zig-cc ubuntu-22.04 (waiting on @blakehatch)

Copy link
Contributor

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: 0 of 1 LGTMs obtained (waiting on @blakehatch)


.github/workflows/issues-notion-sync.yml line 26 at r1 (raw file):

    steps:
      - name: Add GitHub Issues to Notion
        uses: tryfabric/notion-github-action@v1

Please run this tool over the workflow file to double-check that we're not regressing the OSSF warnings: https://app.stepsecurity.io/secureworkflow

The two notable things are:

  1. Instead of uses: xxx/yyy@z, prefer this pattern:
uses: >- # v1
  tryfabric/notion-github-action@f9ed5055c439e20e3f3f3a86e308b40d954ac42e

This way the remote workflow is protected against malicious pushes to the version tag.

  1. Always explicitly set all default permissions to read-all and then explicitly elevate permissions just for the steps that you care about. In the top-level (above jobs):
permissions: read-all

Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with this one as soon as the artifact hash comment is addressed but don't want to add another blocking participant.
:lgtm:

Reviewable status: 0 of 1 LGTMs obtained (waiting on @blakehatch)

@tyr-one
Copy link
Contributor

tyr-one commented Jan 30, 2024

:lgtm:

@tyr-one tyr-one closed this Jan 30, 2024
@tyr-one tyr-one reopened this Jan 30, 2024
Copy link
Contributor Author

@blakehatch blakehatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: 0 of 1 LGTMs obtained, and pending CI: Analyze (javascript-typescript), Bazel Dev / ubuntu-22.04, Local / ubuntu-22.04, Vercel, asan / ubuntu-22.04, docker-compose-compiles-nativelink (20.04), pre-commit-checks, publish-image, ubuntu-20.04 / stable, ubuntu-22.04 (waiting on @blakehatch)


.github/workflows/issues-notion-sync.yml line 22 at r1 (raw file):

Previously, allada (Nathan (Blaise) Bruer) wrote…

nit: Maybe use one of the alpine containers, they are much much smaller?

I couldn't find any hosted alpine containers but I do like the idea of using a lightweight distro for a workflow like this.


.github/workflows/issues-notion-sync.yml line 26 at r1 (raw file):

Previously, aaronmondal (Aaron Siddhartha Mondal) wrote…

Please run this tool over the workflow file to double-check that we're not regressing the OSSF warnings: https://app.stepsecurity.io/secureworkflow

The two notable things are:

  1. Instead of uses: xxx/yyy@z, prefer this pattern:
uses: >- # v1
  tryfabric/notion-github-action@f9ed5055c439e20e3f3f3a86e308b40d954ac42e

This way the remote workflow is protected against malicious pushes to the version tag.

  1. Always explicitly set all default permissions to read-all and then explicitly elevate permissions just for the steps that you care about. In the top-level (above jobs):
permissions: read-all

Done. Didn't know about this tool thanks for sending it!

Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all commit messages.
Dismissed @aaronmondal from a discussion.
Reviewable status: 0 of 1 LGTMs obtained (waiting on @blakehatch)

Copy link
Collaborator

@MarcusSorealheis MarcusSorealheis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: 0 of 1 LGTMs obtained (waiting on @blakehatch)

@MarcusSorealheis MarcusSorealheis dismissed aaronmondal’s stale review January 31, 2024 06:23

The comments were addressed. Time difference.

@MarcusSorealheis
Copy link
Collaborator

Of course, feel free to wait for him if there are no issues with the branch falling behind. I double checked to ensure things were addressed correctly and they were, hence the re-lgtm.

Copy link
Contributor

@aaronmondal aaronmondal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: 0 of 1 LGTMs obtained (waiting on @blakehatch)

@aaronmondal aaronmondal self-assigned this Jan 31, 2024
Copy link
Contributor Author

@blakehatch blakehatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, thank you!

Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

Copy link
Contributor Author

@blakehatch blakehatch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained

@blakehatch blakehatch merged commit 5470857 into TraceMachina:main Jan 31, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate Github Issue Tracking in Notion
5 participants