Skip to content
Merged
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
21 changes: 0 additions & 21 deletions .github/workflows/create_pull_request.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/develop_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: on merging to develop

on:
push:
branches: [ develop ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ./develop_actions.js
with:
GITHUB_TOKEN: ${{secrets.TOKEN}}

18 changes: 0 additions & 18 deletions .github/workflows/merge_pull_request.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/npm-gulp.yml

This file was deleted.

105 changes: 92 additions & 13 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ gulp.task("getpulls", async () => {
});
console.log("pulls", pulls?.data);

const pull = await octokit.request("GET /repos/bmsteven/demo/pulls/16", {
const pull = await octokit.request("GET /repos/bmsteven/demo/pulls/18", {
owner: "bmsteven",
repo: "demo",
pull_number: "16",
pull_number: "18",
});
console.log("pull", pull?.data);
// update pull request
Expand All @@ -109,27 +109,27 @@ gulp.task("getpulls", async () => {
{
owner: "bmsteven",
repo: "demo",
pull_number: "16",
pull_number: "18",
}
);
console.log("commits", commits?.data);
// check if pull request was merged
// const checkPulls = await octokit.request(
// "GET /repos/bmsteven/demo/pulls/16/merge",
// {
// owner: "bmsteven",
// repo: "demo",
// pull_number: "16",
// }
// );
// console.log("checkPulls", checkPulls?.data);
const checkPulls = await octokit.request(
"GET /repos/bmsteven/demo/pulls/18/merge",
{
owner: "bmsteven",
repo: "demo",
pull_number: "18",
}
);
console.log("checkPulls", checkPulls?.data);
// merge pull request
const mergepr = await octokit.request(
"PUT /repos/bmsteven/demo/pulls/16/merge",
{
owner: "bmsteven",
repo: "demo",
pull_number: "16",
pull_number: "18",
}
);
console.log("mergepr", mergepr?.data);
Expand Down Expand Up @@ -163,3 +163,82 @@ gulp.task("getpulls", async () => {
// run: echo "This step will be skipped on Monday and Wednesday"
// - name: Every time
// run: echo "This step will always run"

// create pr action
// name: Pull Request Action
// on:
// push:
// branches:
// - feature/*
// - test/*
// - test

// jobs:
// create-pull-request:
// runs-on: ubuntu-latest
// steps:
// - name: Check out repository code
// uses: actions/checkout@v2
// - name: pull-request
// uses: repo-sync/pull-request@v2
// with:
// destination_branch: "develop"
// github_token: ${{ secrets.GITHUB_TOKEN }}
// pr_label: "feature, automated pr"
// pr_title: "[Example] Simple demo"

// name: test

// on:
// pull_request:
// branches: [master, develop, staging]

// jobs:
// build:
// runs-on: ubuntu-latest

// steps:
// - name: Check Out Repo
// uses: actions/checkout@v2

// # - name: 🔀 Merge Pull Request
// # uses: BaharaJr/merge-pr@0.0.1
// # with:
// # GITHUB_TOKEN: ${{ secrets.TOKEN }}

// name: NodeJS with Gulp

// on:
// push:
// branches: [ develop ]
// paths: ["gulpfile.js"]
// pull_request:
// branches: [ develop ]
// paths: ["gulpfile.js"]

// jobs:
// build:
// runs-on: ubuntu-latest

// strategy:
// fail-fast: false
// matrix:
// node-version: [12.x, 14.x, 16.x]

// steps:
// - uses: actions/checkout@v3

// - name: Use Node.js ${{ matrix.node-version }}
// uses: actions/setup-node@v3
// with:
// node-version: ${{ matrix.node-version }}

// - name: Build
// run: npm install

// - name: gulp
// run: npm install -g gulp axios @octokit/core

// - name: notify
// # run: gulp createnotification --b ${{ secrets.SLACK_WEBHOOK_URL }}
// run: gulp getpulls --b ${{ secrets.TOKEN }}
109 changes: 109 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
},
"homepage": "https://github.com/bmsteven/demo#readme",
"dependencies": {
"@actions/core": "^1.6.0",
"@actions/github": "^5.0.1",
"@octokit/core": "^3.6.0",
"axios": "^0.26.1",
"gulp": "^4.0.2"
Expand Down
Loading