Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 9, 2025

The build-notice.yml pipeline generates an updated NOTICE.txt file but requires manual PR creation to commit changes back to the repository.

Changes:

  • Added create-pull-request.yml template to automatically create PRs with updated NOTICE.txt
    • Branch: eng/update-notice-txt
    • Force push enabled to update existing PR if present
    • Commit message includes build URL for traceability

Implementation:

# Create a PR with the updated NOTICE.txt file
- template: /eng/common/pipelines/templates/steps/create-pull-request.yml
  parameters:
    PushArgs: -f
    PRBranchName: eng/update-notice-txt
    CommitMsg: Update NOTICE.txt from $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)
    PRTitle: Update NOTICE.txt

The create-pull-request.yml template handles git authentication internally, so no separate credential configuration is needed. Follows the same pattern used in publish-cli-docs.yml for automated documentation updates.

Original prompt

This section details on the original issue you should resolve

<issue_title>Automate updating of NOTICE.txt file</issue_title>
<issue_description></issue_description>

<agent_instructions>Update eng/pipelines/build-notice.yml to do some new things:

  1. Update the NOTICE.txt file at the root of the repo with the newly generated NOTICE.txt file. Keep the file name casing.
  2. Use logic like the following in the build-notice.yml to create a PR:
            - template: /eng/common/pipelines/templates/steps/create-pull-request.yml
              parameters:
                PushArgs: -f
                PRBranchName: update-notice-txt
                CommitMsg: Update NOTICE.txt
                PRTitle: Update NOTICE.txt

When the code is ready to review, mention me directly in a PR comment to come and verify the work. </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@danieljurek This is still relevant. There may be prior art in the MCP space.

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Automate updating of NOTICE.txt file Automate NOTICE.txt updates via pull request Dec 9, 2025
Copilot AI requested a review from danieljurek December 9, 2025 23:18
Comment on lines 52 to 53
# Set git credentials to enable pushing changes
- template: /eng/pipelines/templates/steps/set-git-credentials.yml
Copy link
Member

Choose a reason for hiding this comment

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

Remove this. Credentials come as part of the create-pull-request.yml template.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed in 37169ab.

- template: /eng/common/pipelines/templates/steps/create-pull-request.yml
parameters:
PushArgs: -f
PRBranchName: update-notice-txt
Copy link
Member

Choose a reason for hiding this comment

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

Make the PRBranchName eng/update-notice-txt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated to eng/update-notice-txt in 37169ab.

parameters:
PushArgs: -f
PRBranchName: update-notice-txt
CommitMsg: Update NOTICE.txt
Copy link
Member

Choose a reason for hiding this comment

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

Include the build URL using $(System.CollectionUri)$(System.TeamProject)/_build/results?buildId=$(Build.BuildId)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added build URL to CommitMsg in 37169ab.

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 updating of NOTICE.txt file

2 participants