Can I include the default group to greenkeeper.json when other groups also exist - greenkeeper

Background
I've just added a greenekeeper.json file to an already existing (and Greenkeeper enabled) repo to account for additional package.json files that were not previously being monitored by Greenkeeper.
greenkeeper.json
{
"groups": {
"default": {
"packages": [
"package.json"
]
},
"libs": {
"packages": [
"packages/lib1/package.json",
"packages/lib2/package.json",
]
}
}
}
Observation
I see an initial PR for the libs group, but I don't see an initial PR for the default group.
Question
Can I not have a default group, when additional groups (in addition to default) are included?
(i.e. Do I need to rename the default group to something else...?)
Full Disclosure
In my first greenkeeper.json commit, I had included all package.json files in the default group. This commit, predictably, generated an initial Greenkeeper PR, and that PR included library version updates for all package.json files (including root level package.json).
After my second greenkeeper.json commit, Greenkeeper deleted that initial PR, and subsequently created new PRs for each new group, but, it did not generate a PR for the updated default group...so maybe Greenkeeper doesn't create initial PRs for groups that have just been modified (only for those that are newly created)...?

Official response from Greenkeeper (from an email exchange):
An initial branch will only be created for new groups, or groups that have new repositories in them.
Since the default group existed before and there were no new package.json files in that group, no new initial PR commit was created (even though this is the initial greenkeeper.json).
When I re-named that group to root, I did get a new initial PR from Greenkeeper.
Can I not have a default group, when additional groups (in addition to default) are included?
You can have a default group even when there are additional groups in greenkeeper.json.
Do I need to rename the default group to something else...?
Only if you want Greenkeeper to generate a new initial PR.

Related

Laravel JSON-API, includes are not consistent when a model is included multiple times

We have stumbled across a bug that I can only assume is a bug with the JSON API code. This is for the old laravel JSON API (in my composer.json file its "cloudcreativity/laravel-json-api": "^2.0")
The issue is when a resource is included multiple times (in different ways), it is possible to not get all the include information you asked for.
In my example, I am dealing with timesheets. Timesheets belong to a user. They are also approved by a user. Those users are usually different users, but not always. If I want to include both, I would add include=user,approved-by, and this works great.
The front end also sometimes needs to know the employeeType of the user, so we instead use include=user.employee-type,approved-by, and again this works, we get the employee type info for the user. The issue arises when the user is the same as the approver. It appears that JSON-API gets the approved-by user (without the employee type include data), then when it tries to get the timesheet user, it sees that is has already grabbed that user, and just stops there.
The difference in the output is:
The include with the related in
"employeeType": {
"data": {
"type": "employee-types",
"id": "1"
},
"links": {
"self": "link url",
"related": "link url"
}
},
Vs the include without all the related info
"employeeType": {
"links": {
"self": "link url",
"related": "link url"
}
},
We have a work around, where we need to include the employee type of the user and a the approver, but that seems cumbersome and annoying.
I was wondering if anyone knows if there is any good fix for this? Or if this has been fixed in the more recent version (could be the kick in the pants we need to actually migrate to the most recent version of the library)

Create courseWork with studentWorkFolder

Using Google Classroom API, I am simply trying to create a coursework (assignment) where I can assign the Drive folder for that coursework then I can upload attachments into that specific folder.
I've tried on the browser with their API Explorer and also does not work.
Here's my code;
const classroom = google.classroom({version: 'v1', auth});
classroom.courses.courseWork.create({
"courseId": assignmentCreationRequest.courseId,
"resource": {
"title": assignmentCreationRequest.title,
"description": assignmentCreationRequest.description,
"workType": "ASSIGNMENT",
"state": "PUBLISHED",
"topicId": assignmentCreationRequest.topicId,
"assignment":
{
"studentWorkFolder": {
"id": "1wTM6YYAk1rp4TtsEQwjZnb3qMbR9iPbe"
}
}
}
})
The folder has been created inside the Classroom courses folder as parent.
The only way I found working to create such folder is; when creating a coursework, add materials where the share mode is set to 'STUDENT_COPY', then the API will create a folder themselves. It's a workaround where I can delete all of the contents once the folder is created, but surely there's a classier way?
Any help would be massively appreciated!
Answer:
You cannot assign a specific, previously existing Drive folder to a CourseWork.
This folder is automatically created by Google when creating the CourseWork, if the workType is ASSIGNMENT.
Also, the studentWorkFolder will only be created if there's content to place there, be it a studentSubmission or Material attached to the course work.
Reference:
If you check the CourseWork fields, you will see that, assignment (containing studentWorkFolder) is read-only:
assignment: Assignment details. This is populated only when workType is ASSIGNMENT.Read-only.
Therefore, this field will be ignored.
As #lamblichus replied, it is not possible to assign specific folder when creating a courseWork.
The studentWorkFolder will only be created when;
You provide material with shareMode set to STUDENT_COPY.
When student submit attachments to their submission.
For my case where for each submission, I'd like to modifyAttachments with custom files, I have created a folder with the name of the course then placed all of the attachments in the folder with correct permissions, then using modifyAttachments I add the file ID to the submission ID. This still won't create a studentWorkFolder but I'm able to modifyAttachments for each student.
If I were to add materials where the shareMode is STUDENT_COPY, which this will create studentWorkFolder containing the files, then I were to delete all of the contents of the folder; this means I will have a studentWorkFolder however on the courseWork, the materials attached will still be available/shown. patch wouldn't allow to update materials.
I hope this helps those also in similar situation.

TFS Apply Label - label with name alreay exists

So I'm trying to apply a label to my source in TFS and I'm getting notification that the label name I'm supplying alreay exists.
Now, I agree, the same name exists in another directory in a different solution. So is the label name global to root of TFS?
Label has a concept of scope.
Label names must be unique throughout a specified scope. When you add
a label, you reserve the use of that label name at or under the
specified or implied scope. The default value for the #scope
parameter is the team project, for example, $/TeamProject1.
So under the same Team Project, the Label name is unique. However, you could use a tf label command to change the scope:
#scope</i></p></td>
Specifies a Team Foundation version control server directory within which the labelname is unique. This parameter lets you independently
create, manage, retrieve, and delete one label or set of labeled items
when two labels of the same name are in different parts of the Team
Foundation version control server.

Is it possible to have ToDo items to be outside of code?

Working on multi person project, I cant just add comments for todo items into code, which I do not want to check into TFS, however I like to keep my notes to myself and not pollute the source code for everyone else. Is there a way to keep my ToDo list separate from the source code?
Is there an extension that can point to a specific line, source file, but keeps it's items in a separate location than in the source?
I see only one way :
Save your local files (with comments for todo items into code) to a different directory and undo your pending changes.
Do your changes again(without your own ToDo list), and check in the file into TFS.

I have a UCM component on a base CC vob, but cannot see it from a base CC view

Here is my layout:
base CC vob name: vobs/sbftest
UCM vob name: vobs/P_sbftest
Vobadmin created a default "Source" component for my UCM vob that looks like this:
vobs/P_sbftest/Source
Vobadmin also created a project for my UCM vob:
so my project explorer looks like this:
I added files to "Source" component through a remote client window.
Up to here all works find.
However, some of my team members will prefer to work under base CC, so according to this:
What are all the steps to migrate from Base clearcase to UCM?
Base CC views should be able to see my Source component, and the files that it contains, but this is not the case in my situation.
I created a base CC view and it shows other folders created directly in the base CC view, but the view does not see the "Source" component folder created by the UCM view.
Am I missing something?
Shouldn't the base CC view be able to see the "Source" components?
Here are the specs of the base CC view:
element * CHECKEDOUT
element * /main/LATEST
load \sbftest
Any help will be much appreciated.
When you are using UCM, ClearCase will create branches named after your Stream name.
So, you need to add a selection rule which will select the versions added to your Stream:
element * CHECKEDOUT
element * .../sbfuser_testir_proj_dev_strm/LATEST
element * .../am_testir_proj_dev_strm/LASTEST
element * .../testir_proj_int_strm/LASTEST
element * /main/LATEST
load \sbftest
Note the '.../branchname/LATEST' syntax which means: select the LATEST versions of the branch 'branchname', whatever the parent branch is.
I am not sure under which Stream you added your files, so the above config spec will select first the versions of branch 'sbfuser_testir_proj_dev_strm'.
If there is no version in that branch, it will default to the LATEST versions in branch 'am_testir_proj_dev_strm'.
If there is no version in that dev branch, it will default to the LATEST of the integration branch.
The OP falconk comments:
I asked around here and it looks like the UCM component was not created with the right options
That would explain the issue, since the only option when creating a component (see cleartool mkcomp) is the -root one: a component is either a "root-based" or "rootless".
If that component has no root, it is a "meta-component" made to aggregate other components.
And no amount of config spec selection rules will allow for "Source" to be seen.

Resources