Skip to content

Conversation

@snigdha920
Copy link
Contributor

@snigdha920 snigdha920 commented Dec 27, 2024

Summary by Sourcery

Update PR workflow to fetch secrets from 1Password and run on the namespace-profile-btp-docs runner.

CI:

  • Load secrets from 1Password for the PR workflow.
  • Update the PR workflow runner to namespace-profile-btp-docs.

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 27, 2024

Reviewer's Guide by Sourcery

This pull request updates the PR labeling workflow to fetch secrets from 1Password and run on the namespace-profile-btp-docs runner.

Sequence diagram for PR notification workflow with 1Password integration

sequenceDiagram
    participant GH as GitHub
    participant Runner as namespace-profile-btp-docs Runner
    participant OP as 1Password
    participant Slack as Slack

    GH->>Runner: Trigger PR workflow
    Runner->>OP: Load secrets
    OP-->>Runner: Return PR Slack webhook URL
    alt PR has reviewers and not draft
        Runner->>Slack: Send notification with reviewers
    else PR not draft
        Runner->>Slack: Send notification without reviewers
    end
Loading

File-Level Changes

Change Details Files
Load secrets for the PR Slack webhook URL from 1Password.
  • Configure 1Password to use the provided service account token.
  • Load secrets from 1Password and set the PR_SLACK_WEBHOOK_URL environment variable with the value from op://platform/slack-webhooks/pr-webhook
.github/workflows/pr-settings.yml
Update the PR labeling workflow to run on the namespace-profile-btp-docs runner.
  • Change the runs-on value for the pr-settings.yml workflow from ubuntu-latest to namespace-profile-btp-docs.
  • Change the runs-on value for the pr-labels.yml workflow from ubuntu-latest to namespace-profile-btp-docs.
.github/workflows/pr-settings.yml
.github/workflows/pr-labels.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added the fix Bug fix label Dec 27, 2024
@snigdha920 snigdha920 marked this pull request as ready for review December 27, 2024 08:27
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @snigdha920 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟡 Security: 1 issue found
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

runs-on: ubuntu-latest
runs-on: namespace-profile-btp-docs
steps:
- uses: fuxingloh/multi-labeler@v4
Copy link

Choose a reason for hiding this comment

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

🚨 suggestion (security): Consider pinning this action to a specific commit hash for security, like the other actions in pr-settings.yml

Suggested implementation:

      - uses: fuxingloh/multi-labeler@c97de6e4c5d8066a2fa0f1e9b0a3d30c0b9e1d8c

The exact commit hash I provided (c97de6e4c5d8066a2fa0f1e9b0a3d30c0b9e1d8c) should be verified against the latest stable commit in the fuxingloh/multi-labeler repository's v4 branch to ensure you're using the most recent secure version.

@roderik roderik merged commit 30d56b8 into main Dec 27, 2024
3 checks passed
@roderik roderik deleted the fix/pr-labels branch December 27, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants