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

[DO NOT MERGE] Test PR to try to add automated PR comments #884

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/pr-comment-api-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
This PR changes files in the API project. Does it change _any_ of the API interfaces in _any way_? Please note that this includes the following types of changes:
- Changing the signature of an existing interface method
- Adding a new method to an existing interface
- Adding a required data member to a class that an existing interface method consumes

Because any of these changes can potentially break a downstream consumer with customized interface implementations, these changes need to be treated as breaking changes. Please do one of the following:

## Option 1 - Publish this as a breaking change
1. Update the documentation to show the new functionality and/or explain the change
2. Bump the major version in the next release

## Option 2 - Refactor the changes to be non-breaking
1. Review [this commit](https://github.com/microsoft/sbom-tool/commit/4d0ce83e194ed6feace53666aeb6280f5b8b8769), which adds a new interface in a backward-compatible way
2. Refactor the change to follow this pattern so that existing interfaces are left completely intact
3. Bump the minor version in the next release
22 changes: 22 additions & 0 deletions .github/workflows/pr-comment-api-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check for API changes

on:
pull_request:
paths:
- 'src/Microsoft.Sbom.Api/**/*.cs'

jobs:
auto-comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: PR Comment
run:
gh pr comment $PRNUM --body-file .github/workflows/pr-comment-api-change.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PRNUM: ${{ github.event.pull_request.number }}
1 change: 1 addition & 0 deletions src/Microsoft.Sbom.Api/SBOMGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace Microsoft.Sbom.Api;

/// <summary>
/// Responsible for an API to generate SBOMs.
/// This is a dummy comment to test the PR workflow
/// </summary>
public class SbomGenerator : ISBOMGenerator
{
Expand Down
Loading