diff --git a/.github/label-actions.yml b/.github/label-actions.yml new file mode 100644 index 000000000..40c4db1cf --- /dev/null +++ b/.github/label-actions.yml @@ -0,0 +1,43 @@ +'needs-discussion': + unlabel: + - 'bug' + - 'triage' + comment: > + **Please create a GitHub Discussion instead of this issue.** + + + As this issue has been labeled as `needs-discussion` by a maintainer it is being automatically closed and locked. It will later be deleted to avoid polluting repository searches with duplicate or incorrect content. + + + This doesn't necessarily mean that what you've reported isn't a problem or a reasonable idea, but it does mean that it should be raised as a Discussion first and not an Issue. _Please create a Discussion now, assuming you still wish to discuss it._ + + + Thanks, Azure DevOps Migration Tools team + close: true + lock: true + lock-reason: 'resolved' + + +'needs-code-formatting': + comment: > + Hi, you need to format code or logs here so that they're more readable for others. + + + You can find a Markdown code formatting guide [here](https://www.markdownguide.org/basic-syntax/#code) as well as some GitHub-specific information formatting code blocks [here](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks). + + + Thanks, Azure DevOps Migration Tools team + +'retry-latest-version': + comment: > + Hi there, + + + You're reporting a problem with an old version of the Azure DevOps Migration Tools. + Please try the latest version and tell us if that fixes your problem. + + + Good luck, + + + Thanks, Azure DevOps Migration Tools team diff --git a/.github/workflows/labal-action.yml b/.github/workflows/labal-action.yml new file mode 100644 index 000000000..70375daa8 --- /dev/null +++ b/.github/workflows/labal-action.yml @@ -0,0 +1,27 @@ +name: 'Label Actions' + +on: + issues: + types: [labeled] + discussion: + types: [labeled] + pull_request_target: + types: [labeled, unlabeled] + +permissions: + contents: read + issues: write + discussions: write + +jobs: + reaction: + runs-on: ubuntu-latest + steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.NKDAGILITY_BOT_APP_ID }} + private-key: ${{ secrets.NKDAGILITY_BOT_CLIENTSECRET }} + - uses: dessant/label-actions@v4 + with: + github-token: ${{ steps.app-token.outputs.token }} \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index f25102135..dc3288e64 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -9,6 +9,12 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: + - uses: actions/create-github-app-token@v1 + id: app-token + with: + app-id: ${{ secrets.NKDAGILITY_BOT_APP_ID }} + private-key: ${{ secrets.NKDAGILITY_BOT_CLIENTSECRET }} - uses: actions/labeler@v5 with: - sync-labels: true \ No newline at end of file + sync-labels: true + repo-token: ${{ steps.app-token.outputs.token }} \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7be8b225..3e0ca19b4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -150,11 +150,12 @@ jobs: echo $markdown >> $Env:GITHUB_STEP_SUMMARY # Build, Test, Sonar Cloud Analysis, & Package + build: name: "Build, Test, Sonar Cloud Analysis, & Package" runs-on: windows-latest needs: Setup - if: ${{ needs.Setup.outputs.HasChanged_src }} + if: ${{ success() && ( needs.Setup.outputs.HasChanged_src ) }} env: solution: '**/*.sln' buildPlatform: 'Any CPU' @@ -235,6 +236,7 @@ jobs: BuildDocs: name: "Build Documentation output" runs-on: ubuntu-latest + if: ${{ success() && ( needs.Setup.outputs.HasChanged_docs ) }} needs: [Setup] env: GitVersion_SemVer: ${{ needs.Setup.outputs.GitVersion_SemVer }} @@ -273,7 +275,7 @@ jobs: HasChanged_docs: ${{ needs.Setup.outputs.HasChanged_docs }} HasChanged_automation: ${{ needs.Setup.outputs.HasChanged_automation }} needs: [build, Setup] - if: ${{ success() }} #&& ( needs.Setup.outputs.nkdAgility_Ring != 'Canary' ) + if: ${{ success() && ( needs.Setup.outputs.nkdAgility_Ring != 'Canary' ) && ( needs.Setup.outputs.HasChanged_src ) }} steps: - uses: actions/download-artifact@v4 with: