Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release' into andrew/NR-282993-p…
Browse files Browse the repository at this point in the history
…in-actions-to-sha
  • Loading branch information
Andrew Anguiano committed Jun 26, 2024
2 parents c99a855 + 7218c6e commit 68445b8
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 307 deletions.
60 changes: 0 additions & 60 deletions .github/workflows/pr-merged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,6 @@ jobs:
id: generate-uuids
run: cd utils && yarn generate-uuids

- name: Temporarily disable branch protections
id: disable-branch-protection
if: always()
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
script: |
const result = await github.rest.repos.updateBranchProtection({
owner: context.repo.owner,
repo: context.repo.repo,
branch: 'release',
required_status_checks: null,
restrictions: null,
enforce_admins: null,
required_pull_request_reviews: null
})
console.log("Result:", result)
- name: Commit changes
id: commit-changes
run: |
Expand All @@ -69,45 +51,3 @@ jobs:
- name: Push Commit
if: env.commit == 'true'
run: git push origin HEAD

- name: Re-enable branch protections
id: enable-branch-protection
if: always()
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
script: |
const result = await github.rest.repos.updateBranchProtection({
owner: context.repo.owner,
repo: context.repo.repo,
branch: 'release',
required_status_checks: {
strict: true,
contexts: [
'Validation / Image count and extension compliance',
'Validation / Ensure icons exist',
'Validation / Install plan ids exist',
'Validation / Data source ids exist',
'Validation / Install plan schema compliance',
'Validation / Data source schema compliance',
'Validation / Quickstart id are unique',
'Validation / Validate Quickstart Schema',
'Validation / Quickstart dashboard name is unique'
]
},
restrictions: {
"users":[],
"teams":[],
"apps":[]
},
enforce_admins: true,
required_pull_request_reviews: {
dismiss_stale_reviews: true,
required_approving_review_count: 1,
dismissal_restrictions: {
users: [],
teams: []
}
}
})
console.log("Result:", result)
94 changes: 0 additions & 94 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,100 +10,6 @@ env:
THIRD_PARTY_GIT_AUTHOR_NAME: nr-opensource-bot

jobs:
generate-schema-docs:
name: Generate GraphQL schema documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744
with:
token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
ref: "main"
fetch-depth: 0

- name: Setup workspace
uses: "./.github/actions/bootstrap"

- name: Generate schema docs for GraphQl
id: generate-schema
env:
NR_API_URL: ${{ secrets.NR_API_URL }}
NR_API_TOKEN: ${{ secrets.NR_API_TOKEN }}
run: cd utils && yarn generate-schema-docs

- name: Commit changes
id: commit-changes
run: |
git config --local user.email "${{ env.THIRD_PARTY_GIT_AUTHOR_EMAIL }}"
git config --local user.name "${{ env.THIRD_PARTY_GIT_AUTHOR_NAME }}"
git add ./docs/*
git diff-index --quiet HEAD ./docs/* || git commit -m 'chore: generate schema documentation [skip ci]'
echo "commit=true" >> $GITHUB_ENV
- name: Temporarily disable branch protections
id: disable-branch-protection
if: always()
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
script: |
const result = await github.rest.repos.updateBranchProtection({
owner: context.repo.owner,
repo: context.repo.repo,
branch: 'main',
required_status_checks: null,
restrictions: null,
enforce_admins: null,
required_pull_request_reviews: null
})
console.log("Result:", result)
- name: Push Commit
if: env.commit == 'true'
run: git push origin HEAD

- name: Re-enable branch protections
id: enable-branch-protection
if: always()
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
with:
github-token: ${{ secrets.OPENSOURCE_BOT_TOKEN }}
script: |
const result = await github.rest.repos.updateBranchProtection({
owner: context.repo.owner,
repo: context.repo.repo,
branch: 'main',
required_status_checks: {
strict: true,
contexts: [
'Validation / Image count and extension compliance',
'Validation / Ensure icons exist',
'Validation / Install plan ids exist',
'Validation / Data source ids exist',
'Validation / Install plan schema compliance',
'Validation / Data source schema compliance',
'Validation / Quickstart id are unique',
'Validation / Validate Quickstart Schema',
'Validation / Quickstart dashboard name is unique'
]
},
restrictions: {
"users":[],
"teams":[],
"apps":[]
},
enforce_admins: true,
required_pull_request_reviews: {
dismiss_stale_reviews: true,
required_approving_review_count: 1,
dismissal_restrictions: {
users: [],
teams: []
}
}
})
console.log("Result:", result)
generate-third-party-notices:
runs-on: ubuntu-latest
steps:
Expand Down
82 changes: 0 additions & 82 deletions utils/graphql-schemas/constants.js

This file was deleted.

70 changes: 0 additions & 70 deletions utils/graphql-schemas/generate-schema-docs.js

This file was deleted.

1 change: 0 additions & 1 deletion utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"generate-uuids": "ts-node generate-uuids.ts",
"sanitize-dashboard": "ts-node sanitize_dashboards.ts",
"dashboard-helper": "ts-node dashboard-helper.ts",
"generate-schema-docs": "ts-node graphql-schemas/generate-schema-docs.js",
"preview": "ts-node preview.ts",
"create-preview-links": "ts-node create-preview-links.ts",
"set-alert-policy-required-datasources": "ts-node set-alert-policy-required-datasources.ts",
Expand Down

0 comments on commit 68445b8

Please sign in to comment.