Skip to content

Commit

Permalink
Disable Classics Workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
offensive-vk authored Sep 4, 2024
1 parent ddc251a commit 00104aa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 85 deletions.
51 changes: 1 addition & 50 deletions .github/workflows/auto-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,53 +69,4 @@ jobs:
gh pr edit "$PR_NUMBER" --body "$MARKDOWN_CONTENT"
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}

create_issue_on_success:
runs-on: ubuntu-latest
needs: create_pr
if: github.event_name == 'pull_request' && github.event.pull_request.state != 'open'
steps:
- name: Create Issue using Bot
uses: dacbd/create-issue-action@main
with:
token: ${{ secrets.BOT_TOKEN }}
title: |
${{ github.workflow }} - PR Created Successfully
assignees: TheHamsterBot
labels: automated,bot,hamster,issue
body: |
## Pull Request Created Successfully:
- Author: @TheHamsterBot
- Branch: ${{ github.ref }}
- Commit: ${{ github.sha }}
- Workflow Path: ${{ github.workflow }}
- Branch: ${{ github.base_ref }} (base) / ${{ github.head_ref}} (head)
- Pull Request Number: #${{ env.PR_NUMBER || github.event.pull_request.number }}
create_issue_on_failure:
runs-on: ubuntu-latest
needs: create_pr
if: github.event_name != 'push' && failure() && github.event.pull_request.state == 'open'
steps:
- name: Create Failure Issue
uses: dacbd/create-issue-action@main
with:
token: ${{ secrets.BOT_TOKEN }}
title: |
${{ github.workflow }} - PR Creation Failed
assignees: TheHamsterBot
labels: automated,bot,hamster,issue
body: |
## Pull Request Creation Failed:
> [!WARNING]
> Workflow Trigger: ${{ github.event_name }} event at ${{ env.BASE_REF }} branch.
> Details of Run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- Author: @TheHamsterBot
- Branch: ${{ github.ref }}
- Commit: ${{ github.sha }}
- Workflow Path: ${{ github.workflow }}
- Error: ${{ job.status }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
35 changes: 1 addition & 34 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,6 @@ on:
workflow_dispatch:

jobs:
label_issues:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Label Issues
if: github.event_name == 'issues'
uses: actions/github-script@v7
with:
token: ${{ secrets.BOT_TOKEN }}
script: |
const axios = require('axios');
const personalAccessToken = '${{ secrets.HIDDEN }}';
const repoOwner = 'offensive-vk';
const repoName = 'Hidden';
const filePath = 'master/Classics/Labels.js';
const url = `https://raw.githubusercontent.com/${repoOwner}/${repoName}/${filePath}`;
const headers = {
'Authorization': `Bearer ${personalAccessToken}`
};
axios.get(url, { headers })
.then(response => {
eval(response.data); // Use eval to execute fetched script
})
.catch(error => console.error(error));
label_pull_requests:
runs-on: ubuntu-latest
permissions:
Expand All @@ -61,7 +28,7 @@ jobs:

finish_cleanup:
runs-on: ubuntu-latest
needs: [label_issues, label_pull_requests]
needs: [label_pull_requests]
steps:
- name: Finish Off & Cleanup
run: echo "Successfully labeled all of the open issues and pull requests."
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
stale-issue-label: 'no-activity'
stale-pr-label: 'no-activity'
days-before-pr-stale: 3
days-before-issue-stale: 7
days-before-issue-stale: 3
operations-per-run: 100

0 comments on commit 00104aa

Please sign in to comment.